|
iMSTK
Interactive Medical Simulation Toolkit
|
class to represent a graph object More...
#include <imstkGraph.h>
Public Types | |
| enum | ColoringMethod { Greedy, WelshPowell } |
Public Member Functions | |
| Graph (const size_t size) | |
| void | addEdge (const size_t v, const size_t w) |
| Add edge to the graph. | |
| void | getEdges (const size_t v, edgeType &edges) const |
| Get edges surrounding a node. | |
| size_t | size () const |
| Get size of the graph. | |
| void | print () const |
| print adjacency list representation of graph | |
| void | setDefaultColoringMethod (ColoringMethod method) |
| Set the default colorizing method. | |
| graphColorsType | doColoring (ColoringMethod method=ColoringMethod::WelshPowell, bool print=false) const |
| Colorize using the given method and prints the assignment of colors. More... | |
Protected Member Functions | |
| graphColorsType | doColoringGreedy (bool print=false) const |
| Colorize using greedy algorithm and print the assignment of colors. More... | |
| graphColorsType | doColoringWelshPowell (bool print=false) const |
| Colorize using Welsh-Powell algorithm and print the assignment of colors. More... | |
Protected Attributes | |
| std::vector< edgeType > | m_adjList |
| A array of std::vectors to represent adjacency list. | |
| ColoringMethod | m_ColoringMethod = ColoringMethod::WelshPowell |
class to represent a graph object
Definition at line 18 of file imstkGraph.h.
| Graph::graphColorsType imstk::Graph::doColoring | ( | ColoringMethod | method = ColoringMethod::WelshPowell, |
| bool | print = false |
||
| ) | const |
Colorize using the given method and prints the assignment of colors.
Definition at line 54 of file imstkGraph.cpp.


|
protected |
Colorize using greedy algorithm and print the assignment of colors.
Definition at line 152 of file imstkGraph.cpp.

|
protected |
Colorize using Welsh-Powell algorithm and print the assignment of colors.
Definition at line 62 of file imstkGraph.cpp.

1.8.13