mapss.dif.csdf
Class CSDFNodeWeight

java.lang.Object
  extended by mapss.dif.DIFNodeWeight
      extended by mapss.dif.csdf.CSDFNodeWeight
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
SDFNodeWeight

public class CSDFNodeWeight
extends DIFNodeWeight

Information associated with an CSDF node. CSDFNodeWeights are objects associated with Nodes that represent CSDF nodes in Graphs. This class caches frequently-used data associated with CSDF nodes. It is also useful for representing intermediate CSDF graph representations that do not correspond to Ptolemy II models, and performing graph transformations (e.g. convertion to and manipulation of single-rate graphs). It is intended for use with analysis/synthesis algorithms that operate on generic graph representations of CSDF models.

Version:
$Id: CSDFNodeWeight.java 406 2007-05-10 14:27:07Z plishker $
Author:
Shuvra S. Bhattacharyya
See Also:
Node, CSDFEdgeWeight

Constructor Summary
CSDFNodeWeight()
          Construct an CSDF node weight with no computation to be represented by the associated CSDF node.
CSDFNodeWeight(java.lang.Object computation)
          Construct an CSDF node weight given a computation that is to be represented.
CSDFNodeWeight(java.lang.Object computation, int instanceNumber)
          Create an CSDF node weight given a computation that is to be represented by the CSDF node, and a given instance number.
 
Method Summary
 int getInstanceNumber()
          Return the instance number of the associated CSDF node.
 void setInstanceNumber(int instanceNumber)
          Set the instance number of the CSDF node.
 java.lang.String toString()
          Return a string representation of the CSDF node that is represented by this node weight.
 
Methods inherited from class mapss.dif.DIFNodeWeight
clone, getComputation, setComputation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CSDFNodeWeight

public CSDFNodeWeight(java.lang.Object computation,
                      int instanceNumber)
Create an CSDF node weight given a computation that is to be represented by the CSDF node, and a given instance number. The computation may be any Object that represents a computation in some way (or null if no computation is to be represented by the node). The represented computation may, for example, be a Ptolemy II AtomicActor. The instance number distinguishes multiple CSDF nodes that represent the same computation (e.g., an actor that has been decomposed into multiple units in an intermediate representation, or multiple execution phases of the same subsystem). Instances are numbered consecutively, starting at zero.

Parameters:
computation - the computation to be represented by the CSDF node.
instanceNumber - the instance number.

CSDFNodeWeight

public CSDFNodeWeight(java.lang.Object computation)
Construct an CSDF node weight given a computation that is to be represented. Assume this is the first (number 0) instance of the computation.

Parameters:
computation - the computation to be represented by the CSDF node.

CSDFNodeWeight

public CSDFNodeWeight()
Construct an CSDF node weight with no computation to be represented by the associated CSDF node.

See Also:
CSDFNodeWeight(Object, int)
Method Detail

getInstanceNumber

public int getInstanceNumber()
Return the instance number of the associated CSDF node.

Returns:
the instance number.
See Also:
CSDFNodeWeight(Object, int).

setInstanceNumber

public void setInstanceNumber(int instanceNumber)
Set the instance number of the CSDF node.

Parameters:
instanceNumber - the instance number.
See Also:
CSDFNodeWeight(Object, int).

toString

public java.lang.String toString()
Return a string representation of the CSDF node that is represented by this node weight.

Overrides:
toString in class DIFNodeWeight
Returns:
the string representation.