byucc.jhdl.synth
Class CFEdge

java.lang.Object
  extended bybyucc.jhdl.synth.graph.Edge
      extended bybyucc.jhdl.synth.CFEdge

public class CFEdge
extends Edge

The basic edge for any ControlFlowGraph. This edge supports an Integer weight property.

See Also:
CFVertex, ControlFlowGraph

Field Summary
 
Fields inherited from class byucc.jhdl.synth.graph.Edge
head, tail
 
Constructor Summary
CFEdge(Vertex tail, Vertex head)
          Construct a new CFEdge pointing from tail to head.
CFEdge(Vertex t, Vertex h, java.lang.Integer weight)
          Construct a new edge from tail -> head with the given weight.
CFEdge(Vertex t, Vertex h, java.lang.String weight)
          Construct a new edge from tail -> head with the given weight.
 
Method Summary
protected  java.lang.String edgeDotLabels()
           
protected  java.lang.String edgeDotProperties()
           
 java.lang.String getWeight()
          Get the weight associated with this edge.
 void setProperty(java.lang.String key, java.lang.String value)
          Set a property, (a key->value pair), for this edge.
 void setWeight(java.lang.Integer weight)
          Set the weight for this edge.
 void setWeight(java.lang.String weight)
          Set the weight for this edge.
 
Methods inherited from class byucc.jhdl.synth.graph.Edge
equals, getHead, getTail, setHead, setTail, toDot, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CFEdge

public CFEdge(Vertex tail,
              Vertex head)
Construct a new CFEdge pointing from tail to head.

Parameters:
tail - The tail vertex for the new edge.
head - The head vertex for the new edge.

CFEdge

public CFEdge(Vertex t,
              Vertex h,
              java.lang.Integer weight)
Construct a new edge from tail -> head with the given weight.

Parameters:
t - The vertex that is the tail of the new edge, (the vertex from which the edge leaves).
h - The vertex that is the head of the new edge, (the vertex to which the edge points).

CFEdge

public CFEdge(Vertex t,
              Vertex h,
              java.lang.String weight)
Construct a new edge from tail -> head with the given weight.

Parameters:
t - The vertex that is the tail of the new edge, (the vertex from which the edge leaves).
h - The vertex that is the head of the new edge, (the vertex to which the edge points).
Method Detail

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
Set a property, (a key->value pair), for this edge. This method is called by the graph parser when reading in a .dot file. CFEdge supports a weight key with an integer value. No other properties are supported.

Overrides:
setProperty in class Edge
Parameters:
key - A string representing the key for this property.
value - A string representing the value associated with key.

setWeight

public void setWeight(java.lang.Integer weight)
Set the weight for this edge.

Parameters:
weight - the new weight for this edge.

setWeight

public void setWeight(java.lang.String weight)
Set the weight for this edge.

Parameters:
weight - the new weight for this edge.

getWeight

public java.lang.String getWeight()
Get the weight associated with this edge.

Returns:
this edge's weight or null if it has no weight.

edgeDotProperties

protected java.lang.String edgeDotProperties()
Overrides:
edgeDotProperties in class Edge

edgeDotLabels

protected java.lang.String edgeDotLabels()
Overrides:
edgeDotLabels in class Edge


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.