org.shapelogic.mathematics
Class NumericTruthTableStream

java.lang.Object
  extended by org.shapelogic.streams.BaseCommonStream<E>
      extended by org.shapelogic.streams.BaseCommonNumberedStream<java.lang.Double>
          extended by org.shapelogic.mathematics.NumericTruthTableStream
All Implemented Interfaces:
java.util.Iterator<java.lang.Double>, CalcValue<java.lang.Double>, ContextGettable, LazyCalc<java.lang.Double>, RecursiveContext, NumberedStream<java.lang.Double>, Stream<java.lang.Double>, StreamProperties

public class NumericTruthTableStream
extends BaseCommonNumberedStream<java.lang.Double>

NumericTruthTableStream creates Numeric Truth Table Stream with different phases.

Author:
Sami Badawi

Field Summary
 
Fields inherited from class org.shapelogic.streams.BaseCommonStream
_context, _current, _dirty, _last, _maxLast, _name, _nullLegalValue, _parentContext, _query, _value
 
Constructor Summary
NumericTruthTableStream()
           
NumericTruthTableStream(int phase)
           
NumericTruthTableStream(int phase, boolean oneCycle)
           
NumericTruthTableStream(int phase, java.lang.Integer maxLast)
           
 
Method Summary
 int getStartIndex()
           
 java.lang.Double invokeIndex(int index)
          Calculate the value at an index.
 
Methods inherited from class org.shapelogic.streams.BaseCommonNumberedStream
calcAddNext, get, hasNext, hasNextBase, isCached, isRandomAccess, next, setLast
 
Methods inherited from class org.shapelogic.streams.BaseCommonStream
getContext, getInContext, getIndex, getLast, getMaxLast, getName, getParentContext, getValue, isDeterministic, isDirty, isNullLegalValue, remove, setLastFromInput, setMaxLast, setNullLegalValue, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumericTruthTableStream

public NumericTruthTableStream()

NumericTruthTableStream

public NumericTruthTableStream(int phase)

NumericTruthTableStream

public NumericTruthTableStream(int phase,
                               boolean oneCycle)

NumericTruthTableStream

public NumericTruthTableStream(int phase,
                               java.lang.Integer maxLast)
Method Detail

getStartIndex

public int getStartIndex()

invokeIndex

public java.lang.Double invokeIndex(int index)
Description copied from class: BaseCommonNumberedStream
Calculate the value at an index.
So it gets the needed input value and call the appropriate invoke function.
Can this be used for a filter call?
The index does not make sense for a filter since you do not know where the input is coming from. So maybe just ignore it.
This is a little messy but less messy that what is there now.

Specified by:
invokeIndex in class BaseCommonNumberedStream<java.lang.Double>


Copyright © 2009. All Rights Reserved.