public class GraphPartitioner extends Object implements GraphWalker
Constructor and Description |
---|
GraphPartitioner(Graph graph)
Constructs a new partitioner for a graph.
|
Modifier and Type | Method and Description |
---|---|
void |
finish()
Adds the current partition to the completed set of partitions and creates a new partition.
|
ArrayList<Serializable> |
getPartitions()
Returns the partitions of the graph.
|
boolean |
partition()
Performs the partition.
|
int |
visit(Graphable element,
GraphTraversal traversal)
Adds the element to the current partition.
|
public GraphPartitioner(Graph graph)
graph
- Graph to be partitioned.public boolean partition()
public ArrayList<Serializable> getPartitions()
Graph
public int visit(Graphable element, GraphTraversal traversal)
visit
in interface GraphWalker
element
- The component being visited.traversal
- The traversal controlling the sequence of graph component visits.GraphWalker.visit(Graphable, GraphTraversal)
public void finish()
finish
in interface GraphWalker
GraphWalker.finish()
Copyright © 1996–2023 Geotools. All rights reserved.