Vector<T>.Accumulate Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
Accumulate<TAccumulator>(TAccumulator) | Adds the elements of the vector to the specified accumulator. |
Accumulate<TAccumulator>(TAccumulator, Int32, Int32) | Adds the elements of the vector to the specified accumulator. |
Accumulate<TAccumulator>(TAccumulator)
Adds the elements of the vector to the specified accumulator.
public void Accumulate<TAccumulator>(
ref TAccumulator accumulator
)
where TAccumulator : Object, IAccumulator<T>
Parameters
- accumulator TAccumulator
- The accumulator to add the elements to.
Type Parameters
- TAccumulator
- The type of the accumulator.
Accumulate<TAccumulator>(TAccumulator, Int32, Int32)
Adds the elements of the vector to the specified accumulator.
public void Accumulate<TAccumulator>(
ref TAccumulator accumulator,
int startIndex,
int length
)
where TAccumulator : Object, IAccumulator<T>
Parameters
- accumulator TAccumulator
- The accumulator to add the elements to.
- 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.
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. |