TimeChain
A segment chain is similar to a LinkedList, providing some specific features for Samples, like checking temporal integrity constraints, a custom iterator etc.
Let old
and new
denote the state of this
before and after some mutating operations. Two data integrity constraints must hold on the data structure:
- Monotonicity invariant:
forall element: current.getStart() < next.getStart() && current.getStart() > prev.getStart()
- Ending condition invariant:
end > getLast().getStart() && old.end <= new.end
TODO: they should be enforced by mutators and trivially satisfied at the beginning, i.e. with no segments
See also
Constructors
Link copied to clipboard
It defines a chain of time segments that ends at some time instant
It defines a chain of time segments that ends at some time instant
public void TimeChain(@NotNull() @NotNull() List<Sample<T, V>> segments, @NotNull() @NotNull() T end)
WARNING: this interface assumes the programmer is taking responsibility about the Monotonicity of the ordered list of segments.