Represents a bipartition of a graph.
Inheritance Hierarchy
Remarks
If a bipartition of the graph exists, isBipartite is true and firstPartition and secondPartition contain the nodes that make up the partitions. The inSamePartition method can be used to determine whether two nodes are in the same partition.
If no bipartition of the graph exists, isBipartite is false and any collections and mappings of the result are empty.
This class cannot be instantiated
Members
No filters for this type
Properties
Gets the first partition of a bipartite graph.
Gets the first partition of a bipartite graph.
If the graph is not bipartite, this partition is empty.
readonlyfinal
If the original graph is not bipartite, this is set to false and all collections and mappings of this result are empty.
When using Bipartition, isBipartite should always be checked first before working with the result.
readonlyfinal
Gets a mapping from each node to its partition.
Gets a mapping from each node to its partition.
This is either the firstPartition or the secondPartition.
If the graph is not bipartite, this mapping is empty and returns null for all nodes.
readonlyfinal
Gets the second partition of a bipartite graph.
Gets the second partition of a bipartite graph.
If the graph is not bipartite, this partition is empty.
readonlyfinal
Methods
final
Parameters
Return Value
- boolean
trueif both nodes are in the same partition,falseif they are in different partitions. If the graph is not bipartite,trueis returned.