API

API

ItemGraph{T,S}([graph])

Create a new ItemGraph with items of type T based on a graph from LightGraphs. Items of type S can be assigned to the edges of the graph, this type can be omitted and will be Float64 by default. graph can be omitted as well and a DiGraph will be used by default. Otherwise all paths are recomputed whenever a new edge is inserted.

source
edgeitem(graph, from, to)

Get the item assigned to the edge between from and to.

source
edgeitems(graph, from, to)

Get all items assigned to the edges between from and to. Will return an empty array if either from or to are not a part of graph or if there is no path between them.

source
ItemGraphs.itemsMethod.
items(graph, from, to)

Get the items on the path between and including from and to. Will return an empty array if either from or to are not a part of graph or if there is no path between them.

source
add_edge!(graph, from, to, [item])

Add an edge between from and to to graph. Optionally assign an item to the edge.

source
add_vertex!(graph, item)

Add item to graph.

source
has_path(graph, from, to)

Return true if there is a path between from and to in graph.

source
has_vertex(graph, item)

Return true if item is contained in graph.

source