at.dms.kjc.flatgraph
Class FlatWeights
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FlatWeights
public FlatWeights(Vector<FlatNode> nodeEdges,
int[] weights)
- Set up data for later use by iterator.
- Parameters:
nodeEdges
- from edges for spltter / incoming for joinerweights
- from getWeights for splitter / joiner
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