Satsuma
a delicious .NET graph library
|
Decides whether the graph is bipartite and finds a bipartition into red and blue nodes. More...
Public Types | |
enum | Flags { None = 0, CreateRedNodes = 1 << 0, CreateBlueNodes = 1 << 1 } |
Public Member Functions | |
Bipartition (IGraph graph, Flags flags=0) | |
Properties | |
bool | Bipartite [get, set] |
true if the graph is bipartite. More... | |
HashSet< Node > | BlueNodes [get, set] |
The elements of the blue color class. More... | |
IGraph | Graph [get, set] |
The input graph. More... | |
HashSet< Node > | RedNodes [get, set] |
The elements of the red color class. More... | |
Decides whether the graph is bipartite and finds a bipartition into red and blue nodes.
Example:
Definition at line 103 of file Connectivity.cs.
Enumerator | |
---|---|
None | |
CreateRedNodes |
If set, RedNodes will contain the red nodes if the graph is bipartite. |
CreateBlueNodes |
If set, BlueNodes will contain the blue nodes if the graph is bipartite. |
Definition at line 106 of file Connectivity.cs.
Definition at line 163 of file Connectivity.cs.
|
getset |
true
if the graph is bipartite.
Definition at line 118 of file Connectivity.cs.
|
getset |
The elements of the blue color class.
Null if Flags.CreateBlueNodes was not set during construction. Otherwise, empty if the graph is not bipartite.
Definition at line 126 of file Connectivity.cs.
|
getset |
The input graph.
Definition at line 116 of file Connectivity.cs.
|
getset |
The elements of the red color class.
Null if Flags.CreateRedNodes was not set during construction. Otherwise, empty if the graph is not bipartite.
Definition at line 122 of file Connectivity.cs.