Vector<T>.TryAggregate Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2

Overload List

TryAggregate<TResult>(Aggregator<T, TResult>, TResult)

Applies the specified aggregator to the vector.
C#
public virtual bool TryAggregate<TResult>(
	Aggregator<T, TResult> aggregator,
	out TResult result
)

Parameters

aggregator  Aggregator<T, TResult>
An aggregator.
result  TResult
On return, the result of the aggregation.

Type Parameters

TResult
The type of the result of the aggregation.

Return Value

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

TryAggregate<TResult>(Aggregator<T, TResult>, Nullable<Boolean>, TResult)

Applies the specified aggregator to the vector.
C#
public bool TryAggregate<TResult>(
	Aggregator<T, TResult> aggregator,
	bool? skipMissingValues,
	out TResult result
)

Parameters

aggregator  Aggregator<T, TResult>
An aggregator.
skipMissingValues  Nullable<Boolean>
Specifies whether missing values should be excluded from the aggregation. If null, then the value is set to the vector's CheckForMissingValues attribute.
result  TResult
On return, the result of the aggregation.

Type Parameters

TResult
The type of the result of the aggregation.

Return Value

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

TryAggregate<TResult, TPredicate>(Aggregator<T, TResult>, TPredicate, Nullable<Boolean>, TResult)

Applies the specified aggregator to the vector.
C#
public virtual bool TryAggregate<TResult, TPredicate>(
	Aggregator<T, TResult> aggregator,
	TPredicate predicate,
	bool? skipMissingValues,
	out TResult result
)
where TPredicate : struct, new(), IFastFunc<T, bool>

Parameters

aggregator  Aggregator<T, TResult>
An aggregator.
predicate  TPredicate
A predicate that filters the values that are to be included in the aggregation.
skipMissingValues  Nullable<Boolean>
Specifies whether missing values should be excluded from the aggregation. If null, then the value is set to the value of the vector's CheckForMissingValues attribute.
result  TResult
On return, the result of the aggregation.

Type Parameters

TResult
The type of the result of the aggregation.
TPredicate
The type of predicate.

Return Value

Boolean

See Also