edu.ucla.belief.recursiveconditioning
Class RCIteratorArray

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

public class RCIteratorArray
extends RCIterator

This class iterates through trees & graphs but does not guarantee any particular node ordering.

This one is designed to use more memory but run faster than RCIteratorTraversal.

Author:
David Allen

Constructor Summary
RCIteratorArray(Collection roots)
           
RCIteratorArray(RCIterator itr)
           
RCIteratorArray(RCNode root)
           
RCIteratorArray(RCNode[] roots)
           
RCIteratorArray(RCNode[] nodesToIterate, Object dummy)
          Will iterate using nodesToIterate (no copies are made).
 
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

RCIteratorArray

public RCIteratorArray(RCNode root)

RCIteratorArray

public RCIteratorArray(RCNode[] roots)

RCIteratorArray

public RCIteratorArray(Collection roots)

RCIteratorArray

public RCIteratorArray(RCIterator itr)

RCIteratorArray

public RCIteratorArray(RCNode[] nodesToIterate,
                       Object dummy)
Will iterate using nodesToIterate (no copies are made).

Guarantees ordering in nodesToIterate.

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