SandMark version 3.0


sandmark.watermark.ct.trace.callforest
Class Path

java.lang.Object
  |
  +--sandmark.util.graph.Path
        |
        +--sandmark.watermark.ct.trace.callforest.Path
All Implemented Interfaces:
java.lang.Comparable

public class Path
extends Path
implements java.lang.Comparable


Field Summary
 
Fields inherited from class sandmark.util.graph.Path
 
Constructor Summary
Path()
          Construct an empty path.
Path(Path P)
          Construct a copy of the path P.
 
Method Summary
 int compareTo(java.lang.Object p2)
          Return (-1,0,1), the result of comparing the weight of this path to that of p2.
 boolean equals(java.lang.Object path2)
          Return true if path2 is equal to this path.
static void main(java.lang.String[] args)
           
(package private) static Node mkNode(int number, int weight)
           
 int numberOfMarkNodes()
          Return the number of sm$mark()/ENTER-nodes in the path.
 int pathWeight()
          Return the weight of this path.
(package private) static void test1()
           
 java.lang.String toString()
          Generate a string representation of this paths.
 
Methods inherited from class sandmark.util.graph.Path
add, addFirst, concatenate, elements, firstNode, get, getPath, hashCode, iterator, lastNode, onPath, segment, size
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Path

public Path()
Construct an empty path.


Path

public Path(Path P)
Construct a copy of the path P.

Method Detail

toString

public java.lang.String toString()
Generate a string representation of this paths.

Overrides:
toString in class Path

pathWeight

public int pathWeight()
Return the weight of this path.


numberOfMarkNodes

public int numberOfMarkNodes()
Return the number of sm$mark()/ENTER-nodes in the path.


equals

public boolean equals(java.lang.Object path2)
Return true if path2 is equal to this path.

Overrides:
equals in class Path

compareTo

public int compareTo(java.lang.Object p2)
Return (-1,0,1), the result of comparing the weight of this path to that of p2.

Note: this class has a natural ordering that is inconsistent with equals.

Two paths are equal if they contain the same nodes in the same order. p1.compareTo(p2) will return 0, however, if the two paths have the same weight.

Specified by:
compareTo in interface java.lang.Comparable

mkNode

static Node mkNode(int number,
                   int weight)

test1

static void test1()

main

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

SandMark version 3.0

Wed Jan 29 10:30:05 MST 2003