Grouping.ByValue Method

Definition

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

Overload List

ByValue<TInput>(IList<TInput>) Constructs a grouping based on the values in the specified list.
ByValue<TInput>(IList<TInput>, IntervalIndex<TInput>) Constructs a grouping based on binned values.
ByValue<TInput>(IList<TInput>, IEqualityComparer<TInput>) Constructs a grouping based on the values in the specified list.
ByValue<TInput>(IList<TInput>, TInput, TInput, Int32) Constructs a grouping based on binned values.

ByValue<TInput>(IList<TInput>)

Constructs a grouping based on the values in the specified list.
C#
public static Grouping<TInput> ByValue<TInput>(
	IList<TInput> values
)

Parameters

values  IList<TInput>
A list that contains the values to group on.

Type Parameters

TInput
The element type of the list.

Return Value

Grouping<TInput>

ByValue<TInput>(IList<TInput>, IntervalIndex<TInput>)

Constructs a grouping based on binned values.
C#
public static Grouping<Interval<TInput>> ByValue<TInput>(
	IList<TInput> values,
	IntervalIndex<TInput> index
)
where TInput : Object, IComparable<TInput>

Parameters

values  IList<TInput>
A list of values.
index  IntervalIndex<TInput>
The index used to partition the values.

Type Parameters

TInput
The type of the values.

Return Value

Grouping<Interval<TInput>>
A grouping object that represents the grouping of values into bins specified by index.

ByValue<TInput>(IList<TInput>, IEqualityComparer<TInput>)

Constructs a grouping based on the values in the specified list.
C#
public static Grouping<TInput> ByValue<TInput>(
	IList<TInput> values,
	IEqualityComparer<TInput> comparer
)

Parameters

values  IList<TInput>
A list that contains the values to group on.
comparer  IEqualityComparer<TInput>
A comparer that determines when two values are equal.

Type Parameters

TInput
The element type of the list.

Return Value

Grouping<TInput>

Exceptions

ArgumentNullException

values is null.

ByValue<TInput>(IList<TInput>, TInput, TInput, Int32)

Constructs a grouping based on binned values.
C#
public static Grouping<Interval<TInput>> ByValue<TInput>(
	IList<TInput> values,
	TInput lowerBound,
	TInput upperBound,
	int numberOfBins
)
where TInput : Object, IComparable<TInput>

Parameters

values  IList<TInput>
A list of values.
lowerBound  TInput
The lower bound of the range.
upperBound  TInput
The upper bound of the range.
numberOfBins  Int32
The number of intervals.

Type Parameters

TInput
The type of the values.

Return Value

Grouping<Interval<TInput>>
A grouping object that represents the grouping of values into numberOfBins bins between lowerBound and upperBound.

See Also