org.shapelogic.streams
Class ArrayOutputListStream
java.lang.Object
org.shapelogic.streams.BaseCommonStream<E>
org.shapelogic.streams.BaseListCommonStream<E>
org.shapelogic.streams.BaseListStreamList<java.lang.Number,double[]>
org.shapelogic.streams.ArrayOutputListStream
- All Implemented Interfaces:
- java.lang.Iterable<double[]>, java.util.Iterator<double[]>, CalcList<java.lang.Number,double[]>, CalcValue<double[]>, ContextGettable, LazyCalc<double[]>, RecursiveContext, InputStreamList<java.lang.Number,double[]>, ListStream<double[]>, NumberedStream<double[]>, Stream<double[]>, StreamProperties
public class ArrayOutputListStream
- extends BaseListStreamList<java.lang.Number,double[]>
ArrayOutputListStream takes a list of NumberStreams and creates a ListStream of double[].
This could be made more general, but start simple.
- Author:
- Sami Badawi
Field Summary |
protected java.util.List<java.lang.String> |
_ohNames
Parallel to the NumberedStream. |
protected boolean |
_setupRun
|
Constructor Summary |
ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
RecursiveContext recursiveContext)
|
ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
RecursiveContext recursiveContext,
int maxLast)
|
ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
RecursiveContext recursiveContext,
java.util.List<NumberedStream<java.lang.Number>> inputStream)
|
ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
RecursiveContext recursiveContext,
java.util.List<NumberedStream<java.lang.Number>> inputStream,
int maxLast)
|
ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
RecursiveContext recursiveContext,
java.lang.String name,
int maxLast)
Use the ohName to also be the name of the input stream. |
Method Summary |
java.util.List<NumberedStream<java.lang.Number>> |
getInputStream()
Stream that this stream is connected to. |
double[] |
invoke(java.util.List<java.lang.Number> input)
|
void |
setup()
Currently not super well define used for 2 purposes:
Reset: called from the outside if you want to reuse it
init: Called from the inside when calculation start to have everything setup
maybe the semantic could work for both?
TODO: This should be separated better. |
Methods inherited from class org.shapelogic.streams.BaseCommonStream |
getContext, getInContext, getIndex, getLast, getMaxLast, getName, getParentContext, getValue, isDeterministic, isDirty, isNullLegalValue, remove, setMaxLast, setNullLegalValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.shapelogic.calculation.LazyCalc |
isDirty |
Methods inherited from interface java.util.Iterator |
remove |
_ohNames
protected java.util.List<java.lang.String> _ohNames
- Parallel to the NumberedStream.
_setupRun
protected boolean _setupRun
ArrayOutputListStream
public ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
RecursiveContext recursiveContext,
java.lang.String name,
int maxLast)
- Use the ohName to also be the name of the input stream.
- Parameters:
ohNames
- maxLast
-
ArrayOutputListStream
public ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
RecursiveContext recursiveContext,
int maxLast)
ArrayOutputListStream
public ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
RecursiveContext recursiveContext)
ArrayOutputListStream
public ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
RecursiveContext recursiveContext,
java.util.List<NumberedStream<java.lang.Number>> inputStream,
int maxLast)
ArrayOutputListStream
public ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
RecursiveContext recursiveContext,
java.util.List<NumberedStream<java.lang.Number>> inputStream)
setup
public void setup()
- Description copied from interface:
LazyCalc
- Currently not super well define used for 2 purposes:
Reset: called from the outside if you want to reuse it
init: Called from the inside when calculation start to have everything setup
maybe the semantic could work for both?
TODO: This should be separated better.
- Specified by:
setup
in interface LazyCalc<double[]>
- Overrides:
setup
in class BaseCommonStream<double[]>
invoke
public double[] invoke(java.util.List<java.lang.Number> input)
getInputStream
public java.util.List<NumberedStream<java.lang.Number>> getInputStream()
- Description copied from interface:
InputStreamList
- Stream that this stream is connected to.
What if the Range is of different type?
I think that maybe I can relax this later.
- Specified by:
getInputStream
in interface InputStreamList<java.lang.Number,double[]>
- Overrides:
getInputStream
in class BaseListStreamList<java.lang.Number,double[]>
Copyright © 2009. All Rights Reserved.