Package | com.yworks.yfiles.algo |
Class | public class Bipartitions |
Inheritance | Bipartitions YObject Object |
Method | Defined By | ||
---|---|---|---|
Bipartitions(init:Boolean = true) | Bipartitions | ||
equals(o:Object):Boolean | YObject | ||
[static]
Calculates a bipartition of the given graph if one exists. | Bipartitions | ||
getClass():Class [override] | Bipartitions | ||
hashCode():int | YObject | ||
isBipartite(graph:Graph):Boolean [static]
Tests whether or not the given graph is bipartite. | Bipartitions | ||
[static] | Bipartitions |
Method | Defined By | ||
---|---|---|---|
initBipartitions():void | Bipartitions |
Constant | Defined By | ||
---|---|---|---|
BLUE : Object = BLUE [static]
Marker for a node that belongs to the blue partition
| Bipartitions | ||
RED : Object = RED [static]
Marker for a node that belongs to the red partition
| Bipartitions |
Bipartitions | () | Constructor |
public function Bipartitions(init:Boolean = true)
init:Boolean (default = true )
|
getBipartition | () | method |
public static function getBipartition(graph:Graph, markMap:NodeMap):Boolean
Calculates a bipartition of the given graph if one exists.
If the graph is bipartite then for all nodes of the given graph either RED or BLUE objects will put in the given node map, depending on the partition the node belongs to.Complexity O(nodeCount()+edgeCount())
Parameters
graph:Graph | |
markMap:NodeMap |
Boolean — isBipartite(graph)
|
See also
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initBipartitions | () | method |
protected final function initBipartitions():void
isBipartite | () | method |
public static function isBipartite(graph:Graph):Boolean
Tests whether or not the given graph is bipartite.
Complexity O(nodeCount()+edgeCount())
Parameters
graph:Graph |
Boolean |
newBipartitions | () | method |
BLUE | Constant |
public static const BLUE:Object = BLUE
Marker for a node that belongs to the blue partition
RED | Constant |
public static const RED:Object = RED
Marker for a node that belongs to the red partition