V
- the graph vertex typeE
- the graph edge typepublic class BipartitePartitioning<V,E> extends Object implements PartitioningAlgorithm<V>
The algorithm runs in linear time in the number of vertices and edges.
PartitioningAlgorithm.Partitioning<V>, PartitioningAlgorithm.PartitioningImpl<V>
Constructor and Description |
---|
BipartitePartitioning(Graph<V,E> graph)
Constructs a new bipartite partitioning.
|
Modifier and Type | Method and Description |
---|---|
PartitioningAlgorithm.Partitioning<V> |
getPartitioning()
Computes a vertex partitioning.
|
boolean |
isBipartite()
Test whether the input graph is bipartite.
|
boolean |
isValidPartitioning(PartitioningAlgorithm.Partitioning<V> partitioning)
Check if the given vertex partitioning is valid.
|
public boolean isBipartite()
public PartitioningAlgorithm.Partitioning<V> getPartitioning()
getPartitioning
in interface PartitioningAlgorithm<V>
public boolean isValidPartitioning(PartitioningAlgorithm.Partitioning<V> partitioning)
isValidPartitioning
in interface PartitioningAlgorithm<V>
partitioning
- the input vertex partitioningCopyright © 2019. All rights reserved.