Packagecom.yworks.yfiles.algo
Classpublic class IndependentSets
InheritanceIndependentSets Inheritance YObject Inheritance Object

This class provides methods for calculating independent sets.



Public Methods
 MethodDefined By
  
IndependentSets(init:Boolean = true)
IndependentSets
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
IndependentSets
  
[static] Calculates an independent set for a given conflict graph (each pair of nodes of the independent set is non-adjacent in the conflict graph).
IndependentSets
  
getIndependentSets(conflictGraph:Graph):Vector.<Object>
[static] Partitions the vertex set of the given conflict graph into independent sets.
IndependentSets
 Inherited
hashCode():int
YObject
Constructor Detail
IndependentSets()Constructor
public function IndependentSets(init:Boolean = true)



Parameters
init:Boolean (default = true)
Method Detail
getClass()method
override public function getClass():Class

Returns
Class
getIndependentSet()method 
public static function getIndependentSet(conflictGraph:Graph):NodeList

Calculates an independent set for a given conflict graph (each pair of nodes of the independent set is non-adjacent in the conflict graph). We use a greedy heuristic which tries to find a large independent set.

Precondition The input graph is simple, i.e. it contains neither multi-edges nor selfloops.

Parameters

conflictGraph:Graph — the input graph.

Returns
NodeList — a NodeList containing an independent set of nodes
getIndependentSets()method 
public static function getIndependentSets(conflictGraph:Graph):Vector.<Object>

Partitions the vertex set of the given conflict graph into independent sets.

Precondition The input graph is simple, i.e. it contains neither multi-edges nor selfloops.

Parameters

conflictGraph:Graph — the input graph.

Returns
Vector.<Object> — a NodeList array where each entry contains an independent set of nodes.

See also