mapss.dif.psdf
Class PSDFGraph

java.lang.Object
  extended by mocgraph.Graph
      extended by mocgraph.DirectedGraph
          extended by mapss.dif.DIFGraph
              extended by mapss.dif.psdf.PSDFGraph
All Implemented Interfaces:
java.lang.Cloneable

public class PSDFGraph
extends DIFGraph

Information associated with a PSDF graph. This class caches frequently-used data associated with PSDF graphs. It is also useful for intermediate PSDF graph representations (between the application model and implementation), and performing graph transformations (e.g. quasi-static scheduling). It is intended for use with analysis/synthesis algorithms that operate on generic graph representations of PSDF models.

PSDFGraph nodes and edges have weights of type PSDFNodeWeight and PSDFEdgeWeight, respectively.

Version:
$Id: PSDFGraph.java 409 2007-05-13 19:47:16Z plishker $
Author:
Shuvra S. Bhattacharyya, Chia-Jui Hsu
See Also:
PSDFEdgeWeight, PSDFNodeWeight, PSDFGraphReader

Constructor Summary
PSDFGraph()
          Construct an empty PSDF graph.
PSDFGraph(int nodeCount)
          Construct an empty PSDF graph with enough storage allocated for the specified number of nodes.
PSDFGraph(int nodeCount, int edgeCount)
          Construct an empty PSDF graph with enough storage allocated for the specified number of edges, and number of nodes.
 
Method Summary
 PSDFAttributeType getGraphType()
          Get the type of this graph.
 void printEdgeRateExpressions()
          Print the expressions associated with the data rates on each edge.
 void setGraphType(PSDFAttributeType type)
          set type to either PSDFAttributeType.InitGraph, PSDFAttributeType.SubinitGraph, PSDFAttributeType.BodyGraph, or PSDFAttributeType.PSDFSpecification.
 boolean validEdgeWeight(java.lang.Object weight)
          Verify edge weight for PSDF graph.
 boolean validNodeWeight(java.lang.Object weight)
          Verify node weight for PSDF graph.
 
Methods inherited from class mapss.dif.DIFGraph
_getAttributeContainer, _registerEdge, _registerNode, _removeAttributeContainer, _removeReferenceFromAttributes, _setAttributeContainer, addEdge, addEdge, equals, getAttribute, getAttribute, getAttributeByContent, getAttributeByContent, getAttributeDescriptions, getAttributeDescriptions, getAttributeNames, getAttributeNames, getAttributes, getAttributes, getAttributesByContent, getAttributesByContent, getEdge, getName, getName, getNode, getObject, getParameter, getParameterNames, getParameters, hashCode, hideEdge, mergeGraph, mirror, mirror, removeAllAttributes, removeAllAttributes, removeAttribute, removeAttribute, removeAttribute, removeAttribute, removeEdge, removeNode, removeParameter, restoreEdge, setAttribute, setAttribute, setName, setName, setParameter, subgraph, subgraph
 
Methods inherited from class mocgraph.DirectedGraph
_connect, _connectedSubGraph, _disconnect, _initializeAnalyses, backwardReachableNodes, backwardReachableNodes, backwardReachableNodes, backwardReachableNodes, cycleNodeCollection, cycleNodes, edgeExists, edgeExists, inputEdgeCount, inputEdges, isAcyclic, outputEdgeCount, outputEdges, predecessorEdges, predecessors, reachableNodes, reachableNodes, reachableNodes, reachableNodes, sccDecomposition, selfLoopEdgeCount, sinkNodeCount, sinkNodes, sourceNodeCount, sourceNodes, subgraphs, successorEdges, successors, toDirectedAcyclicGraph, topologicalSort, topologicalSort, transitiveClosure
 
Methods inherited from class mocgraph.Graph
_addEdge, _connectEdge, _disconnectEdge, _emptyGraph, _registerChange, addAnalysis, 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, hidden, hiddenEdgeCount, hiddenEdges, incidentEdgeCount, incidentEdges, neighborEdges, neighbors, node, node, nodeCount, nodeLabel, nodeLabel, nodes, nodes, nodes, nodeWeight, selfLoopEdgeCount, selfLoopEdges, selfLoopEdges, toString, validateWeight, validateWeight, validateWeight, validateWeight, weightArray
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PSDFGraph

public PSDFGraph()
Construct an empty PSDF graph.


PSDFGraph

public PSDFGraph(int nodeCount)
Construct an empty PSDF graph with enough storage allocated for the specified number of nodes.

Parameters:
nodeCount - The number of nodes.

PSDFGraph

public PSDFGraph(int nodeCount,
                 int edgeCount)
Construct an empty PSDF graph with enough storage allocated for the specified number of edges, and number of nodes.

Parameters:
nodeCount - The integer specifying the number of nodes
edgeCount - The integer specifying the number of edges
Method Detail

getGraphType

public PSDFAttributeType getGraphType()
Get the type of this graph.

Returns:
PSDFAttributeType.InitGraph, PSDFAttributeType.SubinitGraph, or PSDFAttributeType.BodyGraph.

printEdgeRateExpressions

public void printEdgeRateExpressions()
Print the expressions associated with the data rates on each edge. This is a diagnostic method that prints the variable expressions associated with each data rate parameter to standard output.


setGraphType

public void setGraphType(PSDFAttributeType type)
set type to either PSDFAttributeType.InitGraph, PSDFAttributeType.SubinitGraph, PSDFAttributeType.BodyGraph, or PSDFAttributeType.PSDFSpecification.

Parameters:
type - PSDFAttributeType

validEdgeWeight

public boolean validEdgeWeight(java.lang.Object weight)
Verify edge weight for PSDF graph.

Overrides:
validEdgeWeight in class DIFGraph
Parameters:
weight - The edge weight to verify.
Returns:
True if the given edge weight is valid for a PSDF graph.

validNodeWeight

public boolean validNodeWeight(java.lang.Object weight)
Verify node weight for PSDF graph.

Overrides:
validNodeWeight in class DIFGraph
Parameters:
weight - The node weight to verify.
Returns:
True if the given node weight is valid for a PSDF graph.