NodeNameType - The type used to represent nodespublic interface NodePartitioning<NodeNameType>
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<NodeNameType> |
getAllMembers()
Returns all nodes stored within this partitioning
|
java.lang.Double |
getModularity()
Returns the modularity for this community specification.
|
int |
getNumPartitions()
Return the number of partitions in this partitioning
|
int |
getPartition(NodeNameType node)
Returns the partition id for the input node
|
int |
getPartitionById(int nodeId)
Returns the partition id for the input node
|
java.util.Set<NodeNameType> |
getPartitionMembers(int i)
Returns the members of the ith partition
|
static <NodeNameType> |
printPartitioning(NodePartitioning<NodeNameType> part)
A helper pretty print method so that all partitionings can have the same
look-and-feel.
|
int getNumPartitions()
java.util.Set<NodeNameType> getPartitionMembers(int i)
i - the 0-based index into the partitioningjava.util.Set<NodeNameType> getAllMembers()
int getPartition(NodeNameType node)
node - The node whose partition is desiredint getPartitionById(int nodeId)
nodeId - The node's ID (from the graph) whose partition is desiredjava.lang.Double getModularity()
static <NodeNameType> void printPartitioning(NodePartitioning<NodeNameType> part)
NodeNameType - The type for each nodepart - The partition to print