edu.byu.ece.edif.util.graph
Class EdifOutputPortRefGraph

java.lang.Object
  extended by edu.byu.ece.graph.AbstractGraph
      extended by edu.byu.ece.graph.BasicGraph
          extended by edu.byu.ece.edif.util.graph.AbstractEdifGraph
              extended by edu.byu.ece.edif.util.graph.EdifOutputPortRefGraph
All Implemented Interfaces:
DirectedGraph, java.io.Serializable, java.lang.Cloneable

public class EdifOutputPortRefGraph
extends AbstractEdifGraph

Provides a mathematical graph view of an EdifCell that uses EdifPortRef objects as nodes of the graph. Edges within this graph represent connectivity between ports of the circuit (i.e. EdifCellInstanceEdge objects) or implied connectivity between input ports of cell and its corresponding output ports (i.e. EdifCellInstanceEdge).

This is similar to the EdifCellInstanceGraph graph in that this graph represents the connectivity of an EdifCell object. However, the organization of the graph is much different. There are no objects for EdifCell instances and there are implied edges representing connectivity within an EdifCellInstance. EdifCellInstance objects can be obtained by dereferencing the corresponding EdifPortRef object. EdifNet objects are represented as EdifPortRef source Nodes in the graph.

See Also:
Serialized Form

Field Summary
protected  EdifCell _cell
          The cell corresponding to these connections.
(package private)  ObjectPortRefMap _portRefMap
           
protected  boolean debug
           
 
Fields inherited from class edu.byu.ece.graph.BasicGraph
_nodes, _nodeSinkMap, _nodeSourceMap
 
Constructor Summary
EdifOutputPortRefGraph(EdifCell c)
          Construct a new connectivity object from a EdifCell.
EdifOutputPortRefGraph(EdifOutputPortRefGraph graph)
           
 
Method Summary
protected  void _init(boolean createSourceToSourceEdges, boolean createSinkLeafNodes)
          Initializes the connectivity maps for the given cell.
 java.lang.Object clone()
          Clone the BasicGraph object.
 EdifCell getCell()
          Return the EdifCell object that this connectivity object was created from.
 java.util.Collection<EdifPortRefEdge> getEdges()
          Return a Collection of all edges in the graph.
 BasicGraph getSubGraph(java.util.Collection nodeCollection)
          Creates a sub-graph of the given graph from a sub-set of nodes in the graph.
static void main(java.lang.String[] args)
           
 
Methods inherited from class edu.byu.ece.graph.BasicGraph
addEdge, addNode, addNodes, containsNode, getEdge, getEdges, getInputEdges, getNodes, getNodesWithNoInputEdges, getNodesWithNoOutputEdges, getOutputEdges, getSinkNodes, getSourceNodes, getSubGraph2, invert, removeEdge, removeEdges, removeNode, removeNode, topologicalSort
 
Methods inherited from class edu.byu.ece.graph.AbstractGraph
_getAncestorsOrDescendents, _getAncestorsOrDescendents, getAncestors, getAncestors, getDescendents, getDescendents, getPredecessors, getSuccessors, toDotty, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

protected boolean debug

_cell

protected EdifCell _cell
The cell corresponding to these connections.


_portRefMap

ObjectPortRefMap _portRefMap
Constructor Detail

EdifOutputPortRefGraph

public EdifOutputPortRefGraph(EdifCell c)
Construct a new connectivity object from a EdifCell. Default to include Top Level Ports in the graph and NOT create source-to-source Edges in the Graph.

Parameters:
c -

EdifOutputPortRefGraph

public EdifOutputPortRefGraph(EdifOutputPortRefGraph graph)
Method Detail

getCell

public EdifCell getCell()
Return the EdifCell object that this connectivity object was created from.

Specified by:
getCell in class AbstractEdifGraph
Returns:
EdifCell object used to create this graph.
See Also:
AbstractEdifGraph.getCell()

getEdges

public java.util.Collection<EdifPortRefEdge> getEdges()
Description copied from interface: DirectedGraph
Return a Collection of all edges in the graph. The objects in this collection are of type Edge.

Specified by:
getEdges in interface DirectedGraph
Overrides:
getEdges in class BasicGraph
See Also:
BasicGraph.getEdges()

getSubGraph

public BasicGraph getSubGraph(java.util.Collection nodeCollection)
Creates a sub-graph of the given graph from a sub-set of nodes in the graph. The resulting graph contains a sub-set of nodes and only those edges that connect nodes in the sub-graph.

Specified by:
getSubGraph in interface DirectedGraph
Overrides:
getSubGraph in class BasicGraph
Returns:
a new DirectedGraph object that is a sub-graph of this graph. The sub-graph is based on the Collection of nodes passed in as a parameter.

clone

public java.lang.Object clone()
Description copied from class: BasicGraph
Clone the BasicGraph object.

Overrides:
clone in class BasicGraph

_init

protected void _init(boolean createSourceToSourceEdges,
                     boolean createSinkLeafNodes)
Initializes the connectivity maps for the given cell. Note that this happens only once and that this does not track changes in the EdifCell. If the cell changes, this connectivity will be stale.


main

public static void main(java.lang.String[] args)
Parameters:
args -