Vector<T>.Accumulate Where Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Accumulate | Adds the elements of the vector that match a predicate to the specified accumulator. |
Accumulate | Adds the elements of the vector that match a predicate to the specified accumulator. |
AccumulateWhere<TAccumulator, TPredicate>(TAccumulator, TPredicate)
Adds the elements of the vector that match a predicate to the specified accumulator.
public void AccumulateWhere<TAccumulator, TPredicate>(
ref TAccumulator accumulator,
TPredicate predicate
)
where TAccumulator : Object, IAccumulator<T>
where TPredicate : struct, new(), IFastFunc<T, bool>
Parameters
- accumulator TAccumulator
- The accumulator to add the elements to.
- predicate TPredicate
- A predicate that filters the values that are to be added to the accumulator.
Type Parameters
- TAccumulator
- The type of the accumulator.
- TPredicate
- The type of predicate.
AccumulateWhere<TAccumulator, TPredicate>(TAccumulator, TPredicate, Int32, Int32)
Adds the elements of the vector that match a predicate to the specified accumulator.
public void AccumulateWhere<TAccumulator, TPredicate>(
ref TAccumulator accumulator,
TPredicate predicate,
int startIndex,
int length
)
where TAccumulator : Object, IAccumulator<T>
where TPredicate : struct, new(), IFastFunc<T, bool>
Parameters
- accumulator TAccumulator
- The accumulator to add the elements to.
- predicate TPredicate
- A predicate that filters the values that are to be added to the accumulator.
- startIndex Int32
- The index of the first element of this Vector<T> to be added to the accumulator.
- length Int32
- The number of elements to add to the accumulator.
Type Parameters
- TAccumulator
- The type of the accumulator.
- TPredicate
- The type of predicate.
Exceptions
Argument | startIndex is less than zero or greater than or equal to the length of the vector. -or- length is less than zero. |
Argument | startIndex and length do not specify a valid range in the vector. |