EnumerableExtensionsSplitT(IEnumerableT, FuncT, Double, FuncDouble, T, Double, Int32) Method

Splits the source sequence by a max distance and optional minimum number of intervals applied to a sequence of double.

Definition

Namespace: Karamba.Utilities
Assembly: KarambaCommon (in KarambaCommon.dll) Version: 3.0.8.0+eb23a7103f0eca0b6d808121e15fec6899194e15
C#
public static IEnumerable<T> Split<T>(
	this IEnumerable<T> source,
	Func<T, double> fromObjectToDouble,
	Func<double, T> fromDoubleToObject,
	double maxDistance,
	int minIntervals = 1
)

Parameters

source  IEnumerableT
The source sequence.
fromObjectToDouble  FuncT, Double
Function used to project source elements to double.
fromDoubleToObject  FuncDouble, T
Function used to project back from double to source elements type T.
maxDistance  Double
The maximum distance between two double.
minIntervals  Int32  (Optional)
The minimum number of interval between two double.

Type Parameters

T
Type of element in the source sequence.

Return Value

IEnumerableT
A sequence of split elements.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also