|
|||||||||
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
public class PartitionBase
A base class for partitioned graph structure. This class provides
commonly used methods for
GraphPartition
and PartitionedGraph
.
Basically, this class is still an instance of graph because all partition
structures are indeed graphs.
Constructor Summary | |
---|---|
PartitionBase()
A constructor. |
|
PartitionBase(mocgraph.Graph graph)
Constructor for a given graph. |
Method Summary | |
---|---|
protected void |
_checkGraphElement(mocgraph.Element element)
|
java.util.List |
ascendentListOf(java.util.Collection objects)
An ascendently ordered list of objects. |
java.util.List |
descendentListOf(java.util.Collection objects)
A descendently ordered list of objects. |
int |
getIndex()
Return index of this partition base where it is contained. |
boolean |
removeEdge(mocgraph.Edge edge)
Remove a graph edge and the associated value. |
boolean |
removeNode(mocgraph.Node node)
Remove a graph node and the associated value. |
void |
setElementValue(mocgraph.Element element,
double value)
Set the value of a graph element. |
void |
setElementValues(java.util.Map valueMap)
Set values for graph elements. |
void |
setIndex(int index)
Set index of this partition base where it is contained. |
double |
valueOf(java.lang.Object object)
Get the value associated with the object. |
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 PartitionBase()
public PartitionBase(mocgraph.Graph graph)
graph
- The graph to construct from.Method Detail |
---|
public java.util.List ascendentListOf(java.util.Collection objects)
valueOf(Object)
, being sorted. The
argument comes from nodes()/edges() methods in class Graph
or a collection of GraphPartition
s.
objects
- The objects to be ordered.
public java.util.List descendentListOf(java.util.Collection objects)
valueOf(Object)
, being sorted. The
argument comes from nodes()/edges() methods in class Graph
or a collection of GraphPartition
s.
elements
- The objects to be ordered.
public int getIndex()
public boolean removeEdge(mocgraph.Edge edge)
removeEdge
in class mocgraph.Graph
edge
- The given edge.
public boolean removeNode(mocgraph.Node node)
removeNode
in class mocgraph.Graph
node
- The given node.
public void setElementValue(mocgraph.Element element, double value)
. The previous value is overwritten
if it exists.
- Parameters:
element
- The given graph element.value
- The associated value double.
public void setElementValues(java.util.Map valueMap)
valueMap
- A map of the given elements and values.public void setIndex(int index)
The
- desired index number.public double valueOf(java.lang.Object object)
object
- The object to get the associated value.
java.lang.IllegalArgumentException
- If object invalid to get value.protected void _checkGraphElement(mocgraph.Element element)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |