public interface DoubleSignalSourceVector<S extends DoubleSignalSource> extends List<S>
double.
This interface is intended for grouping signal sources and routing parallel data flow at contruction time of a network. Objects that implement this interface should not themselves contribute to realtime behavior.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
DoubleSignalSourceVector.Mutable<S extends DoubleSignalSource>
Interface of mutable aggregates of signal sources of primitive type
double. |
| Modifier and Type | Method and Description |
|---|---|
default DoubleSignalSourceVector<S> |
append(DoubleSignalSourceVector<S> other)
Returns a new aggregate that combines the components of this and the given
other aggregate in order.
|
static <S extends DoubleSignalSource> |
empty()
Creates a new aggregate with zero components.
|
static <S extends DoubleSignalSource> |
iterate(int size,
Supplier<? extends S> producer)
Creates a new aggregate with a given number components obtained from a producer.
|
default DoubleSignalSourceVector<DoubleSignalSource> |
map(DoubleUnaryOperator op)
Returns a new aggregate that is obtained by uniformly transforming the
values of the corresponding components of this aggregate.
|
static <S extends DoubleSignalSource> |
of(int size)
Creates a mutable aggregate of the given size.
|
static <S extends DoubleSignalSource> |
of(int size,
IntFunction<? extends S> components)
Creates a new aggregate from the given component-valued function.
|
static <S extends DoubleSignalSource> |
of(List<? extends S> components)
Creates a new aggregate from the given list of components.
|
static <S extends DoubleSignalSource> |
of(S... components)
Creates a new aggregate from the given array of components.
|
static <S extends DoubleSignalSource> |
repeat(int size,
S source)
Creates a new aggregate with a given number of identical references to the
same given signal source.
|
static <S extends DoubleSignalSource> |
singleton(S source)
Creates a new aggregate with one component.
|
default int |
sizeCompatibleWith(int expected)
Returns the number of components of this aggregate if equal to the
expected value.
|
default int |
sizeCompatibleWith(List<?> expected) |
default int |
sizeCompatibleWith(Object... expected) |
default DoubleClockedSignalSourceVector |
stored()
Returns a new aggegate whose components take snapshots of the
corresponding components of this aggregate.
|
default DoubleSignalSourceVector<DoubleSignalSource> |
zipWith(DoubleBinaryOperator op,
DoubleSignalSourceVector<?> other)
Returns a new aggregate that is obtained by uniformly combining the values
of the corresponding components of this and another aggregate.
|
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArrayparallelStream, removeIf, stream@Undocumented default int sizeCompatibleWith(List<?> expected)
@Undocumented default int sizeCompatibleWith(Object... expected)
default int sizeCompatibleWith(int expected)
expected - the expected number of componentsIllegalArgumentException - if the number of components of
this aggregate is not equal to the expected number@SafeVarargs static <S extends DoubleSignalSource> DoubleSignalSourceVector<S> of(S... components)
The resulting object is a view of the passed array; concurrent mutation of array elements is observed. For immutable aggregates, no reference to the array should be shared.
components - the componentsNullPointerException - if components == nullstatic <S extends DoubleSignalSource> DoubleSignalSourceVector<S> of(List<? extends S> components)
The specified list is copied internally; later mutations of the original are not reflected.
components - the componentsNullPointerException - if components == nullstatic <S extends DoubleSignalSource> DoubleSignalSourceVector.Mutable<S> of(int size)
null and must be set before use.size - the number of components of the new aggregatestatic <S extends DoubleSignalSource> DoubleSignalSourceVector<S> of(int size, IntFunction<? extends S> components)
The given function is evaluated for all valid indices, from 0 to
size-1, in unspecified order.
components - the component functionNullPointerException - if components == nullstatic <S extends DoubleSignalSource> DoubleSignalSourceVector<S> repeat(int size, S source)
size - the number of elements of the new aggregatesource - the signal source to use as componentIllegalArgumentException - if size < 0static <S extends DoubleSignalSource> DoubleSignalSourceVector<S> iterate(int size, Supplier<? extends S> producer)
size - the number of elements of the new aggregateproducer - the producer of signal source componentsIllegalArgumentException - if size < 0static <S extends DoubleSignalSource> DoubleSignalSourceVector<S> empty()
static <S extends DoubleSignalSource> DoubleSignalSourceVector<S> singleton(S source)
source - the component of the new aggregatedefault DoubleSignalSourceVector<S> append(DoubleSignalSourceVector<S> other)
For app = this.append(other), it holds that app.size() ==
this.size() + other.size(); furthermore, for m = this.size(),
app.get(i) == this.get(i) holds for i < m, and app.get(i) == other.get(i - m) holds for i >= m.
other - the other aggregatedefault DoubleSignalSourceVector<DoubleSignalSource> map(DoubleUnaryOperator op)
For that = this.map(f), it holds that that.size() ==
this.size(); furthermore, at any point in time, that.get(i).getAsDouble() ==
op.applyAsDouble(this.get(i).getAsDouble()) holds.
op - the operator to apply to the values of all componentsDoubleSignalSource.map(DoubleUnaryOperator)default DoubleSignalSourceVector<DoubleSignalSource> zipWith(DoubleBinaryOperator op, DoubleSignalSourceVector<?> other)
For that = this.map(f), it holds that that.size() ==
this.size() == other.size(); furthermore, at any point in time, that.get(i).getAsDouble() ==
op.applyAsDouble(this.get(i).getAsDouble(),
other.get(i).getAsDouble()) holds.
op - the operator to apply to the values of all componentsIllegalArgumentException - if the two aggregates are of different sizeDoubleSignalSource.zipWith(DoubleBinaryOperator, DoubleSignalSource)default DoubleClockedSignalSourceVector stored()
DoubleSignalSource.stored()