|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface KPartiteGraph<NodeType extends java.lang.Comparable<? super NodeType>,WeightType extends java.lang.Comparable<? super WeightType>,PartitionType extends java.lang.Comparable<? super PartitionType>>
A generic interface to a K-partite graph.
Method Summary | |
---|---|
boolean |
addNode(NodeType node,
PartitionType partition)
Adds a node to a specific partition in the graph. |
int |
getK()
Returns the number of possible partitions in the graph. |
int |
getNumPartitions()
Returns the number of partitions currently contained in the graph (not necessarily K if K partitions haven't yet been added). |
java.util.List<PartitionType> |
getPartitions()
Returns a list of the partitions currently contained in the graph (not necessarily K if K partitions haven't yet been added). |
boolean |
isPartition(PartitionType p)
Checks whether a specified partition is one of the partitions used in the graph. |
Methods inherited from interface nct.graph.Graph |
---|
addEdge, addEdge, addNode, clone, compareTo, degreeOfNode, getEdge, getEdgeDescription, getEdges, getEdgeWeight, getId, getNeighbors, getNodes, getScore, isEdge, isNode, numberOfEdges, numberOfNodes, removeEdge, removeNode, setEdgeDescription, setEdgeWeight, setScore, toString |
Method Detail |
---|
java.util.List<PartitionType> getPartitions()
int getNumPartitions()
int getK()
boolean isPartition(PartitionType p)
p
- The partition to check.
boolean addNode(NodeType node, PartitionType partition)
node
- The node to be added to the graph.partition
- The partition the node should be added to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |