Represents a bipartition of a graph.
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.
Type Details
- yfiles module
- view-layout-bridge
- yfiles-umd modules
- view-layout-bridge
- Legacy UMD name
- yfiles.analysis.BipartitionResult
Properties
Gets the first partition of a bipartite graph.
Remarks
Gets a value indicating whether this result represents a bipartition of the graph.
Remarks
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.
Gets a mapping from each node to its partition.
Remarks
This is either the firstPartition or the secondPartition.
If the graph is not bipartite this mapping is empty and returns null
for all nodes.
Gets the second partition of a bipartite graph.
Remarks
Methods
Returns a value indicating whether the specified nodes are in the same partition.
Parameters
A map of options to pass to the method.
Returns
- ↪boolean
true
if both nodes are in the same partition,false
if they are in different partitions. If the graph is not bipartite,true
is returned.