public class Label extends Partitioner
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DESCRIPTION
A short description about the partitioner.
|
private LogManager |
mLogger
The handle to the Logging object.
|
private java.util.Map |
mPartitionMap
A map indexed by the label.
|
private java.util.LinkedList |
mQueue
The first in first out queue, that manages the set of gray vertices in a
breadth first search.
|
mGraph, mProps, mRoot, PACKAGE_NAME, VERSION
Constructor and Description |
---|
Label(GraphNode root,
java.util.Map graph,
PegasusProperties properties)
The overloaded constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
description()
Returns a textual description of the transfer implementation.
|
void |
determinePartitions(Callback c)
Partitions the graph passed in the constructor, on the basis of the labels
associated with the nodes in the graph.
|
private java.lang.String |
getLabel(GraphNode node)
Returns the label for the node.
|
private java.lang.String |
getPartitionID(int id)
Constructs the id for the partition.
|
public static final java.lang.String DESCRIPTION
private java.util.Map mPartitionMap
private java.util.LinkedList mQueue
private LogManager mLogger
public Label(GraphNode root, java.util.Map graph, PegasusProperties properties)
root
- the dummy root node of the graph.graph
- the map containing all the nodes of the graph keyed by
the logical id of the nodes.properties
- the properties passed to the planner.public void determinePartitions(Callback c)
determinePartitions
in class Partitioner
c
- the callback for the partitioner.public java.lang.String description()
description
in class Partitioner
private java.lang.String getLabel(GraphNode node)
node
- the node for which the label is required.private java.lang.String getPartitionID(int id)
id
- the integer id.