|
GraphLibrary
0.0.1
A simple library that implements various graph algorithms.
|
Functions | |
| template<class GRAPH > | |
| std::function< std::pair< bool, gl::Color >const gl::index_type src, const gl::index_type dest)> | getEdgeSelectorFromGraph (const GRAPH &graph, const gl::Color &trueColor=gl::Color("red"), const gl::Color &falseColor=gl::Color("black")) |
| Provides a Selector Object to color the edges in a given Graph. More... | |
| template<class PATH > | |
| std::function< std::pair< bool, gl::Color >const gl::index_type src, const gl::index_type dest)> | getEdgeSelectorFromPath (const PATH &path, const gl::Color &trueColor=gl::Color("red"), const gl::Color &falseColor=gl::Color("black")) |
| Provides a Selector Object to color the edges in a given Path. More... | |
| template<class SHORTEST_PATH_ALGORITHM > | |
| std::function< std::pair< bool, gl::Color >const gl::index_type src, const gl::index_type dest)> | getEdgeSelectorFromShortestPath (SHORTEST_PATH_ALGORITHM &spa, const gl::index_type pathSource, const gl::index_type pathDest, const gl::Color &trueColor=gl::Color("red"), const gl::Color &falseColor=gl::Color("black")) |
| Provides a Selector Object to color the edges in a Shortest Path. More... | |
| template<class SHORTEST_PATH_ALGORITHM > | |
| std::function< std::pair< bool, gl::Color >const gl::index_type src, const gl::index_type dest)> | getEdgeSelectorFromShortestPathTree (SHORTEST_PATH_ALGORITHM &spa, const gl::index_type treeSource, const gl::Color &trueColor=gl::Color("red"), const gl::Color &falseColor=gl::Color("black")) |
| Provides a Selector Object to color the edges in a Shortest Path Tree. More... | |
| template<class PATH > | |
| std::function< std::pair< bool, gl::Color >const gl::index_type node)> | getNodeSelectorFromPath (const PATH &path, const gl::Color &trueColor=gl::Color("red"), const gl::Color &falseColor=gl::Color("white")) |
| Provides a Selector Object to color the nodes in a given Path. More... | |
| template<class SHORTEST_PATH_ALGORITHM > | |
| std::function< std::pair< bool, gl::Color >const gl::index_type node)> | getNodeSelectorFromShortestPath (SHORTEST_PATH_ALGORITHM &spa, const gl::index_type pathSource, const gl::index_type pathDest, const gl::Color &trueColor=gl::Color("red"), const gl::Color &falseColor=gl::Color("white")) |
| Provides a Selector Object to color the nodes in a Shortest Path. More... | |
| template<class SHORTEST_PATH_ALGORITHM > | |
| std::function< std::pair< bool, gl::Color >const gl::index_type node)> | getNodeSelectorFromShortestPathTree (SHORTEST_PATH_ALGORITHM &spa, const gl::index_type treeSource, const gl::Color &trueColor=gl::Color("red"), const gl::Color &falseColor=gl::Color("white")) |
| Provides a Selector Object to color the nodes in a Shortest Path Tree. More... | |
| template<class GRAPH , class EDGE_SELECTOR > | |
| void | colorFlaggedEdges (GRAPH &graph, EDGE_SELECTOR &&selector) |
| Colors edges selectively using a selector function. More... | |
| template<class GRAPH , class NODE_SELECTOR > | |
| void | colorFlaggedNodes (GRAPH &graph, NODE_SELECTOR &&selector) |
| Colors nodes selectively using a selector function. More... | |
| template<class GRAPH , class EDGE_SELECTOR , class NODE_SELECTOR > | |
| void | colorFlaggedEntities (GRAPH &graph, EDGE_SELECTOR &&edge_selector, NODE_SELECTOR &&node_selector) |
| Colors nodes & edges selectively using a selector function. More... | |
| std::function<std::pair<bool,gl::Color>const gl::index_type src, const gl::index_type dest)> gl::interface::getEdgeSelectorFromGraph | ( | const GRAPH & | graph, |
| const gl::Color & | trueColor = gl::Color("red"), |
||
| const gl::Color & | falseColor = gl::Color("black") |
||
| ) |
Provides a Selector Object to color the edges in a given Graph.
| GRAPH | Some Graph type |
| [in] | graph | Graph that contains edges that are to be colored |
| [in] | trueColor | (optional) New color for the graph edges. |
| [in] | falseColor | (optional) New color for all non-graph edges. |
| std::function<std::pair<bool,gl::Color>const gl::index_type src, const gl::index_type dest)> gl::interface::getEdgeSelectorFromPath | ( | const PATH & | path, |
| const gl::Color & | trueColor = gl::Color("red"), |
||
| const gl::Color & | falseColor = gl::Color("black") |
||
| ) |
Provides a Selector Object to color the edges in a given Path.
| PATH | std::pair<bool,typename Graph::idx_list_t>. A Path type whose first element contains a boolean value that states path existence, and the second pair element contains a vector of node IDs in the shortest path. |
| [in] | path | Path of edges and nodes |
| [in] | trueColor | (optional) New color for the path edges. |
| [in] | falseColor | (optional) New color for all non-path edges. |
| std::function<std::pair<bool,gl::Color>const gl::index_type src, const gl::index_type dest)> gl::interface::getEdgeSelectorFromShortestPath | ( | SHORTEST_PATH_ALGORITHM & | spa, |
| const gl::index_type | pathSource, | ||
| const gl::index_type | pathDest, | ||
| const gl::Color & | trueColor = gl::Color("red"), |
||
| const gl::Color & | falseColor = gl::Color("black") |
||
| ) |
Provides a Selector Object to color the edges in a Shortest Path.
| SHORTEST_PATH_ALGORITHM | Shortest Path Algorithm that supports a call to getPath(src,dest) that returns an std::pair<bool,typename Graph::idx_list_t> whose first element contains a boolean value that states path existence, and the second pair element contains a vector of node IDs in the shortest path. |
| [in] | spa | Shortest Path Algorithm (e.g. FloydWarshall, Dijkstra) |
| [in] | pathSource | Start of the shortest path |
| [in] | pathDest | End of the shortest path |
| [in] | trueColor | (optional) New color for the SP edges. |
| [in] | falseColor | (optional) New color for all non-SP edges. |
| std::function<std::pair<bool,gl::Color>const gl::index_type src, const gl::index_type dest)> gl::interface::getEdgeSelectorFromShortestPathTree | ( | SHORTEST_PATH_ALGORITHM & | spa, |
| const gl::index_type | treeSource, | ||
| const gl::Color & | trueColor = gl::Color("red"), |
||
| const gl::Color & | falseColor = gl::Color("black") |
||
| ) |
Provides a Selector Object to color the edges in a Shortest Path Tree.
| SHORTEST_PATH_ALGORITHM | Shortest Path Algorithm that supports a call to getPath(src,dest) that returns an std::pair<bool,typename Graph::idx_list_t> whose first element contains a boolean value that states path existence, and the second pair element contains a vector of node IDs in the shortest path. |
| [in] | spa | Shortest Path Algorithm (e.g. FloydWarshall, Dijkstra) |
| [in] | treeSource | Source of the shortest path tree |
| [in] | trueColor | (optional) New color for the SPT edges. |
| [in] | falseColor | (optional) New color for all non-SPT edges. |
| std::function<std::pair<bool,gl::Color>const gl::index_type node)> gl::interface::getNodeSelectorFromPath | ( | const PATH & | path, |
| const gl::Color & | trueColor = gl::Color("red"), |
||
| const gl::Color & | falseColor = gl::Color("white") |
||
| ) |
Provides a Selector Object to color the nodes in a given Path.
| PATH | std::pair<bool,typename Graph::idx_list_t>. A Path type whose first element contains a boolean value that states path existence, and the second pair element contains a vector of node IDs in the shortest path. |
| [in] | path | Path of edges and nodes |
| [in] | trueColor | (optional) New color for the path nodes. |
| [in] | falseColor | (optional) New color for all non-path nodes. |
| std::function<std::pair<bool,gl::Color>const gl::index_type node)> gl::interface::getNodeSelectorFromShortestPath | ( | SHORTEST_PATH_ALGORITHM & | spa, |
| const gl::index_type | pathSource, | ||
| const gl::index_type | pathDest, | ||
| const gl::Color & | trueColor = gl::Color("red"), |
||
| const gl::Color & | falseColor = gl::Color("white") |
||
| ) |
Provides a Selector Object to color the nodes in a Shortest Path.
| SHORTEST_PATH_ALGORITHM | Shortest Path Algorithm that supports a call to getPath(src,dest) that returns an std::pair<bool,typename Graph::idx_list_t> whose first element contains a boolean value that states path existence, and the second pair element contains a vector of node IDs in the shortest path. |
| [in] | spa | Shortest Path Algorithm (e.g. FloydWarshall, Dijkstra) |
| [in] | pathSource | Start of the shortest path |
| [in] | pathDest | End of the shortest path |
| [in] | trueColor | (optional) New color for the SP nodes. |
| [in] | falseColor | (optional) New color for all non-SP nodes. |
| std::function<std::pair<bool,gl::Color>const gl::index_type node)> gl::interface::getNodeSelectorFromShortestPathTree | ( | SHORTEST_PATH_ALGORITHM & | spa, |
| const gl::index_type | treeSource, | ||
| const gl::Color & | trueColor = gl::Color("red"), |
||
| const gl::Color & | falseColor = gl::Color("white") |
||
| ) |
Provides a Selector Object to color the nodes in a Shortest Path Tree.
| SHORTEST_PATH_ALGORITHM | Shortest Path Algorithm that supports a call to getPath(src,dest) that returns an std::pair<bool,typename Graph::idx_list_t> whose first element contains a boolean value that states path existence, and the second pair element contains a vector of node IDs in the shortest path. |
| [in] | spa | Shortest Path Algorithm (e.g. FloydWarshall, Dijkstra) |
| [in] | treeSource | Source of the shortest path tree |
| [in] | trueColor | (optional) New color for the SPT nodes. |
| [in] | falseColor | (optional) New color for all non-SPT nodes. |
| void gl::interface::colorFlaggedEdges | ( | GRAPH & | graph, |
| EDGE_SELECTOR && | selector | ||
| ) |
Colors edges selectively using a selector function.
| GRAPH | Graph Object. |
| EDGE_SELECTOR | Selector Object: Colors exactly those edges that are "selected". |
| [in] | graph | Reference to graph that needs to be modified. |
| [in] | selector | Reference to selector object |
| void gl::interface::colorFlaggedNodes | ( | GRAPH & | graph, |
| NODE_SELECTOR && | selector | ||
| ) |
Colors nodes selectively using a selector function.
| GRAPH | Graph Object. |
| NODE_SELECTOR | Selector Object: Colors exactly those nodes that are "selected". |
| [in] | graph | Reference to graph that needs to be modified. |
| [in] | selector | Reference to selector object |
| void gl::interface::colorFlaggedEntities | ( | GRAPH & | graph, |
| EDGE_SELECTOR && | edge_selector, | ||
| NODE_SELECTOR && | node_selector | ||
| ) |
Colors nodes & edges selectively using a selector function.
| GRAPH | Graph Object. |
| EDGE_SELECTOR | Selector Object: Colors exactly those edges that are "selected". |
| NODE_SELECTOR | Selector Object: Colors exactly those nodes that are "selected". |
| [in] | graph | Reference to graph that needs to be modified. |
| [in] | edge_selector | Reference to selector object for edges |
| [in] | node_selector | Reference to selector object for nodes |