Package net.vleo.timel.variable
Interface Variable<V>
-
- Type Parameters:
V
- Value Java type
- All Known Implementing Classes:
TreeMapVariable
public interface Variable<V>
Interface for variables. A variable should be a consistent sample store.- Author:
- Andrea Leofreddi
-
-
Method Summary
Modifier and Type Method Description TimeIterator<V>
readBackward(Interval interval, ExecutorContext context)
Read the given interval returning a reverse time iterator from the end to start.TimeIterator<V>
readForward(Interval interval, ExecutorContext context)
Read the given interval returning a forward time iterator from start to end.void
write(Sample<V> sample, ExecutorContext context)
Write a sample into the variable.
-
-
-
Method Detail
-
readForward
TimeIterator<V> readForward(Interval interval, ExecutorContext context)
Read the given interval returning a forward time iterator from start to end. More specifically, return an iterator for all the samples whose interval overlaps or is contained by interval.- Parameters:
interval
- The interval to readcontext
- Evaluation context- Returns:
- A
TimeIterator
reading the map forward for the given interval.
-
readBackward
TimeIterator<V> readBackward(Interval interval, ExecutorContext context)
Read the given interval returning a reverse time iterator from the end to start. More specifically, return an iterator for all the samples whose interval overlaps or is contained by interval in reverse order.- Parameters:
interval
- The interval to readcontext
- Evaluation context- Returns:
- A
TimeIterator
reading the map backward for the given interval.
-
write
void write(Sample<V> sample, ExecutorContext context)
Write a sample into the variable.- Parameters:
sample
- The sample to storecontext
- Executor context
-
-