Aggregator<T, TResult>.TryAggregate Method

Definition

Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4

Overload List

TryAggregate(Vector<T>, TResult) Aggregates the elements of a vector and returns the result.
TryAggregate(IEnumerable<T>, Boolean, TResult) Aggregates the elements of a sequence and returns the result.
TryAggregate(ReadOnlySpan<T>, Boolean, TResult) Aggregates the elements of a vector and returns the result.
TryAggregate(Vector<T>, Int32, Int32, TResult) Aggregates the specified range of elements of a vector and returns the result.
TryAggregate(Int32, ReadOnlySpan<T>, Int32, Boolean, TResult) Aggregates the elements of a vector and returns the result.
TryAggregate(Int32, ReadOnlySpan<T>, Int32, ReadOnlySpan<Boolean>, Int32, Boolean, TResult) Aggregates the elements of a vector and returns the result.

TryAggregate(Vector<T>, TResult)

Aggregates the elements of a vector and returns the result.
C#
public virtual bool TryAggregate(
	Vector<T> values,
	out TResult result
)

Parameters

values  Vector<T>
A vector of values.
result  TResult
On return, the result of the aggregation.

Return Value

Boolean
true if the aggregation produced a result; otherwise false.

TryAggregate(IEnumerable<T>, Boolean, TResult)

Aggregates the elements of a sequence and returns the result.
C#
public bool TryAggregate(
	IEnumerable<T> values,
	bool skipMissingValues,
	out TResult result
)

Parameters

values  IEnumerable<T>
A sequence of values.
skipMissingValues  Boolean
Specifies whether missing values should be excluded from the aggregation.
result  TResult
On return, the result of the aggregation.

Return Value

Boolean
true if the aggregation produced a result; otherwise false.

TryAggregate(ReadOnlySpan<T>, Boolean, TResult)

Aggregates the elements of a vector and returns the result.
C#
public virtual bool TryAggregate(
	ReadOnlySpan<T> values,
	bool skipMissingValues,
	out TResult result
)

Parameters

values  ReadOnlySpan<T>
A read-only span of values.
skipMissingValues  Boolean
Specifies whether missing values should be excluded from the aggregation.
result  TResult
On return, the result of the aggregation.

Return Value

Boolean
true if the aggregation produced a result; otherwise false.

TryAggregate(Vector<T>, Int32, Int32, TResult)

Aggregates the specified range of elements of a vector and returns the result.
C#
public bool TryAggregate(
	Vector<T> values,
	int startIndex,
	int endIndex,
	out TResult result
)

Parameters

values  Vector<T>
A vector of values.
startIndex  Int32
The zero-based index of the first element in values that should be aggregated.
endIndex  Int32
The zero-based index of the last element in values that should be aggregated.
result  TResult
On return, the result of the aggregation.

Return Value

Boolean
true if the aggregation produced a result; otherwise false.

TryAggregate(Int32, ReadOnlySpan<T>, Int32, Boolean, TResult)

Aggregates the elements of a vector and returns the result.
C#
public abstract bool TryAggregate(
	int length,
	ReadOnlySpan<T> values,
	int stride,
	bool skipMissingValues,
	out TResult result
)

Parameters

length  Int32
The number of elements to aggregate.
values  ReadOnlySpan<T>
A read-only span of values.
stride  Int32
The distance between successive elements in values.
skipMissingValues  Boolean
Specifies whether missing values should be excluded from the aggregation.
result  TResult
On return, the result of the aggregation.

Return Value

Boolean
true if the aggregation produced a result; otherwise false.

TryAggregate(Int32, ReadOnlySpan<T>, Int32, ReadOnlySpan<Boolean>, Int32, Boolean, TResult)

Aggregates the elements of a vector and returns the result.
C#
public bool TryAggregate(
	int length,
	ReadOnlySpan<T> values,
	int stride,
	ReadOnlySpan<bool> mask,
	int maskStride,
	bool skipMissingValues,
	out TResult result
)

Parameters

length  Int32
The number of elements to aggregate.
values  ReadOnlySpan<T>
A read-only span of values.
stride  Int32
The distance between successive elements in values.
mask  ReadOnlySpan<Boolean>
A read-only span of booleans.
maskStride  Int32
The distance between successive elements in mask.
skipMissingValues  Boolean
Specifies whether missing values should be excluded from the aggregation.
result  TResult
On return, the result of the aggregation.

Return Value

Boolean
true if the aggregation produced a result; otherwise false.

See Also