|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.algo.Bipartitions
public class Bipartitions
Responsible for graph bipartition problems.
A bipartite graph is a graph whose node set can be partitioned into two sets in such a way that all edges in the graph connect nodes that belong to different partitions. In other words, there are no edges connecting nodes that belong to the same partition.
| Field Summary | |
|---|---|
static Object |
BLUE
Marker for a node that belongs to the blue partition |
static Object |
RED
Marker for a node that belongs to the red partition |
| Constructor Summary | |
|---|---|
Bipartitions()
|
|
| Method Summary | |
|---|---|
static boolean |
getBipartition(Graph graph,
NodeMap markMap)
Calculates a bipartition of the given graph if one exists. |
static boolean |
isBipartite(Graph graph)
Tests whether or not the given graph is bipartite. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Object RED
public static final Object BLUE
| Constructor Detail |
|---|
public Bipartitions()
| Method Detail |
|---|
public static boolean isBipartite(Graph graph)
O(nodeCount()+edgeCount())
public static boolean getBipartition(Graph graph,
NodeMap markMap)
RED or BLUE
objects will put in the given node map, depending on
the partition the node belongs to.
isBipartite(graph)O(nodeCount()+edgeCount())
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||