edu.ucla.belief.recursiveconditioning
Class RCIteratorTraversal

Object
  extended by RCIterator
      extended by RCIteratorTraversal
All Implemented Interfaces:
Iterator

public class RCIteratorTraversal
extends RCIterator

This class iterates/traverses through trees & graphs visiting each node once.

For trees it ensures a parent before child ordering (by using a LIFO queue traversal).

For graphs no such guarantee is given.

Author:
David Allen

Constructor Summary
RCIteratorTraversal(Collection roots)
           
RCIteratorTraversal(RCNode root)
           
RCIteratorTraversal(RCNode[] roots)
           
 
Method Summary
 boolean hasNext()
           
 RCNode nextNode()
          Does not guarantee any particular ordering of the nodes returned.
 void restart()
           
 
Methods inherited from class RCIterator
next, remove
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RCIteratorTraversal

public RCIteratorTraversal(RCNode root)

RCIteratorTraversal

public RCIteratorTraversal(RCNode[] roots)

RCIteratorTraversal

public RCIteratorTraversal(Collection roots)
Method Detail

restart

public void restart()
Specified by:
restart in class RCIterator

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator
Specified by:
hasNext in class RCIterator

nextNode

public RCNode nextNode()
Does not guarantee any particular ordering of the nodes returned.

Specified by:
nextNode in class RCIterator


Copyright 2010 UCLA Automated Reasoning Group