API
SMDGraphs.MappedNodeGraph — TypeMappedNodeGraph{N, G} <: AbstractJSMDGraph{Int}Create a graph with mapped nodes.
Fields
graph– Graphmid– Mapped id to nodes dictionarynodes– Mapped nodesedges– List of the edges between the nodespaths– List of the available paths in the graph
Constructors
MappedNodeGraph{N}(g::G) where {G <: AbstractGraph, N <: AbstractGraphNode}
SMDGraphs.MappedDiGraph — MethodMappedDiGraph(::Type{N}) where {N}Construct a directed MappedNodeGraph from node type N.
SMDGraphs.MappedGraph — MethodMappedGraph(::Type{N}) where {N}Construct a MappedNodeGraph from node type N.
SMDGraphs.add_edge_cost! — Methodadd_edge_cost!(g::MappedNodeGraph{T, <:SimpleGraph}, fid::Int, tid::Int, cost::Int)For a SimpleGraph type, register the edge cost between the nodes with mapped IDs fid and tid in both directions.
SMDGraphs.add_edge_cost! — Methodadd_edge_cost!(g::MappedNodeGraph, fid::Int, tid::Int, cost::Int)Register the cost between of the edge from the node with mapped ID fid to the node with mapped ID tid.
SMDGraphs.compute_paths! — Methodcompute_paths(g::MappedNodeGraph)Compute all possible paths in the graph.
SMDGraphs.get_edgecosts — Methodget_edgecosts(g::MappedNodeGraph, from::Int, to::Int)Get all costs assigned to the edges between from and to. Returns an empty array if either from or to are not a part of g or if there is no path between them.
SMDGraphs.get_mappedid — Methodget_mappedid(g::MappedNodeGraph, node::Int)Get the mappedid associated with a node. The mappedid is the internal ID that is assigned to the node within the graph.
SMDGraphs.get_mappednode — Methodget_mappednode(g::MappedNodeGraph, mid::Int)Get the node associated to the given mapped id.
SMDGraphs.get_node — Methodget_node(g::MappedNodeGraph, node::Int)Get the node associated with a node index.
SMDGraphs.get_node_id — Methodget_node_id(b::AbstractJSMDGraphNode)Get the mapped-id of an AbstractJSMDGraphNode.
This method is abstract! A concrete implementation for each concrete node shall be defined.
SMDGraphs.get_outerid — Methodget_outerid(g::MappedNodeGraph, id::Int)Return the id of the node associated to the mapped id id. The outer ID is the ID that is assigned to the node by the user.