|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmocgraph.Graph
mapss.dif.csdf.sdf.mem.PartitionBase
mapss.dif.csdf.sdf.mem.PartitionedGraph
public class PartitionedGraph
A graph of partitions with additional partition related tools. The partitions are not necessarily disjoint. Disjointness is up to the uers to maintain.
| Constructor Summary | |
|---|---|
PartitionedGraph()
A constructor. |
|
PartitionedGraph(mocgraph.Graph graph)
Constructor for a given graph. |
|
| Method Summary | |
|---|---|
void |
addPartition(GraphPartition partition)
Add the given graph partition. |
void |
addPartitions(int partitionNumber)
Add the given number of graph partitions. |
java.util.List |
ascendentPartitions()
An ascendently ordered list of partitions. |
java.util.List |
descendentPartitions()
A descendently ordered list of partitions. |
GraphPartition |
dualOf(GraphPartition partition)
The dual/other partition of the given partition, assuming totally two partitions of the graph. |
java.util.Collection |
edgeCut()
Get the edge cut set over all partitions. |
java.util.Collection |
edgeCutOf(java.util.Collection partitionCollection)
Get edge cut set over a collection of partitions. |
java.util.Collection |
edgeCutOf(GraphPartition p1,
GraphPartition p2)
Get the edge cut set of two partitions. |
java.lang.String |
edgeCutString(java.util.Collection edgeCut)
Display edge cut in a text string. |
double |
edgeCutValueOf(mocgraph.Node node)
Evaluate the total value of cut edges incident to the node. |
double |
edgeNonCutValueOf(mocgraph.Node node)
Evaluate the total value of non-cut edges incident to the node. |
java.util.List |
getPartitions()
Get all the partitions. |
int |
partitionIndexOf(mocgraph.Element element)
The partition index in the list of partitions. |
int |
partitionIndexOf(GraphPartition partition)
Get the partition index for the given partition. |
GraphPartition |
partitionOf(mocgraph.Element element)
Get the container partition of an element. |
GraphPartition |
partitionOf(int index)
Get the partition for the given partition index. |
java.util.Collection |
partitionsOf(java.util.Collection elementCollection)
Get the assigned partitions of a given collection of elements. |
java.lang.String |
partitionString()
Display partitions in a text string. |
void |
resetPartitions()
Remove all partitions. |
| Methods inherited from class mapss.dif.csdf.sdf.mem.PartitionBase |
|---|
_checkGraphElement, ascendentListOf, descendentListOf, getIndex, removeEdge, removeNode, setElementValue, setElementValues, setIndex, valueOf |
| Methods inherited from class mocgraph.Graph |
|---|
_addEdge, _connect, _connectEdge, _disconnect, _disconnectEdge, _emptyGraph, _initializeAnalyses, _registerChange, _registerEdge, _registerNode, addAnalysis, addEdge, addEdge, addEdge, addEdge, addEdge, addEdges, addGraph, addNode, addNode, addNodes, addNodeWeight, addNodeWeights, changeCount, clone, cloneAs, connectedComponents, containsEdge, containsEdgeWeight, containsNode, containsNodeWeight, edge, edge, edgeCount, edgeLabel, edgeLabel, edges, edges, edges, edgeWeight, equals, hashCode, hidden, hiddenEdgeCount, hiddenEdges, hideEdge, incidentEdgeCount, incidentEdges, neighborEdges, neighbors, node, node, nodeCount, nodeLabel, nodeLabel, nodes, nodes, nodes, nodeWeight, restoreEdge, selfLoopEdgeCount, selfLoopEdgeCount, selfLoopEdges, selfLoopEdges, subgraph, subgraph, toString, validateWeight, validateWeight, validateWeight, validateWeight, validEdgeWeight, validNodeWeight, weightArray |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PartitionedGraph()
public PartitionedGraph(mocgraph.Graph graph)
graph - The graph to construct from.| Method Detail |
|---|
public void addPartition(GraphPartition partition)
partition - The graph partition to add.public void addPartitions(int partitionNumber)
partitionNumber - The number of partitions to add.public java.util.List ascendentPartitions()
PartitionBase.valueOf(Object),
being sorted.
public java.util.List descendentPartitions()
partitionBase#valueOf(Object),
being sorted.
public GraphPartition dualOf(GraphPartition partition)
partition - The given partition.
public java.util.Collection edgeCut()
edgeCutOf(Collection).
public java.util.Collection edgeCutOf(java.util.Collection partitionCollection)
partitionCollection - A collection of partitions.
public java.util.Collection edgeCutOf(GraphPartition p1,
GraphPartition p2)
edgeCutOf(Collection).
p1 - The first partition.p2 - The second partition.
public java.lang.String edgeCutString(java.util.Collection edgeCut)
edgeCut - The edge cut to print.
public double edgeCutValueOf(mocgraph.Node node)
edgeNonCutValueOf(Node).
Caution: It is assumed that all nodes are assigned with partitions before calling this method.
node - The node to evaluate the edge cut value.
public double edgeNonCutValueOf(mocgraph.Node node)
edgeCutValueOf(Node).
Caution: It is assumed that all nodes are assigned with partitions before calling this method.
node - The node to evaluate the non-cut edges' value.
public java.util.List getPartitions()
addPartition(GraphPartition).
List.public int partitionIndexOf(mocgraph.Element element)
element - The graph element to get the belonged partition.
public int partitionIndexOf(GraphPartition partition)
partition - The graph partition.
public GraphPartition partitionOf(int index)
index - The partition index.
public GraphPartition partitionOf(mocgraph.Element element)
element - The given element.
public java.util.Collection partitionsOf(java.util.Collection elementCollection)
elementCollection - The collection of elements.
public java.lang.String partitionString()
public void resetPartitions()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||