at.dms.kjc.flatgraph
Class FlatWeights

java.lang.Object
  extended by at.dms.kjc.flatgraph.FlatWeights
All Implemented Interfaces:
Iterable<FlatWeight>

public final class FlatWeights
extends Object
implements Iterable<FlatWeight>

Need ability to itereate over FlatGraph edges that correspond with non-zero weight edges for splittes and joiners.

Author:
Allyn

Constructor Summary
FlatWeights(Vector<FlatNode> nodeEdges, int[] weights)
          Set up data for later use by iterator.
 
Method Summary
 Iterator<FlatWeight> iterator()
          All access to nodes, weights should be done through this iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlatWeights

public FlatWeights(Vector<FlatNode> nodeEdges,
                   int[] weights)
Set up data for later use by iterator.

Parameters:
nodeEdges - from edges for spltter / incoming for joiner
weights - from getWeights for splitter / joiner
Method Detail

iterator

public Iterator<FlatWeight> iterator()
All access to nodes, weights should be done through this iterator. The iterator will keep track of possibly different offsets FlatNode.edges / FlatNode.incoming and SIRSplitter.getWeights() / SIRJoiner.getWeights(). The objects returned by the iterator conform to the FlatWeight interface.

Specified by:
iterator in interface Iterable<FlatWeight>
Returns:
an iterator