SandMark version 3.0


sandmark.watermark.ct.trace.callforest
Class AllPathsIterator

java.lang.Object
  |
  +--sandmark.util.MultiIter
        |
        +--sandmark.watermark.ct.trace.callforest.AllPathsIterator
All Implemented Interfaces:
java.util.Iterator

class AllPathsIterator
extends MultiIter


Nested Class Summary
(package private)  class AllPathsIterator.Afs
           
 
Field Summary
(package private)  java.util.Vector forest
           
 
Fields inherited from class sandmark.util.MultiIter
 
Constructor Summary
AllPathsIterator(java.util.Vector forest)
          This class generates paths between sm$mark()-nodes in the call forest.
 
Method Summary
 int count()
          Return the number of iterators.
 java.lang.Object create(java.lang.Object[] elmts)
          Create the object to be returned by the enumerator.
(package private)  Node dominatingNode(Node markNode1, Node markNode2)
          Return the lowest dominating node of markNode1 and markNode2.
(package private)  java.util.ArrayList markNodes(Graph graph)
          Generate all the mark ENTER-nodes in the graph.
 java.util.Iterator start(int k, java.lang.Object[] elmts)
          Start enumerator number k.
 java.lang.String toString()
          Generate a string representation of all the paths.
 
Methods inherited from class sandmark.util.MultiIter
genNext, hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

forest

java.util.Vector forest
Constructor Detail

AllPathsIterator

public AllPathsIterator(java.util.Vector forest)
This class generates paths between sm$mark()-nodes in the call forest.

 for every graph g in the forest (in reverse order) do {
    for every mark-node n in g do {
       for every path p starting in n and ending in another mark-node m do {
          yield p;
       }
    }
 }
 

Method Detail

start

public java.util.Iterator start(int k,
                                java.lang.Object[] elmts)
Start enumerator number k. elmts[0..k-1] hold the current generated values for the first k enumerators.

Specified by:
start in class MultiIter

create

public java.lang.Object create(java.lang.Object[] elmts)
                        throws java.lang.Exception
Create the object to be returned by the enumerator. Throws an exception if no element could be generated.

Specified by:
create in class MultiIter
java.lang.Exception

count

public int count()
Return the number of iterators.

Specified by:
count in class MultiIter

markNodes

java.util.ArrayList markNodes(Graph graph)
Generate all the mark ENTER-nodes in the graph.


toString

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

Overrides:
toString in class java.lang.Object

dominatingNode

Node dominatingNode(Node markNode1,
                    Node markNode2)
Return the lowest dominating node of markNode1 and markNode2.


SandMark version 3.0

Wed Jan 29 10:30:05 MST 2003