Click or drag to resize

EnumerableExtensions Class

Extensions to the IEnumerable interface.
Inheritance Hierarchy
SystemObject
  Altaxo.CollectionsEnumerableExtensions

Namespace: Altaxo.Collections
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static class EnumerableExtensions

The EnumerableExtensions type exposes the following members.

Methods
 NameDescription
Public methodStatic memberAreStructurallyEqualT(IEnumerableT, IEnumerableT) Determines whether two enumerations are structural equivalent. They are structurally equivalent if i) both enumerations are null, ii) both enumerations are empty, or c) both enumerations have the same number of elements and contain the same elements in the same order. Please not that if one enumeration is null and the other is empty, they are not considered equivalent.
Public methodStatic memberAreStructurallyEqualT(IEnumerableT, IEnumerableT, IEqualityComparerT) Determines whether two enumerations are structural equivalent. They are structural equivalent if i) both enumerations are null, ii) both enumerations are empty, or c) both enumerations have the same number of elements and contain the same elements in the same order. Please not that if one enumeration is null and the other is empty, they are not considered equivalent.
Public methodStatic memberAsEnumerableT Presents the argument as IEnumerable with one element.
Public Extension MethodDisposeElements Disposes all elements of the enumeration.
Public methodStatic memberEmptyT Returns an empty enumeration of T.
Public methodStatic memberEquallySpacedByStartStepCount Gets an enumeration where the elements are given by start + i * step, i=[0, count-1].
Public Extension MethodFirstOrT Returns the first value of the enumeration, or, if the enumeration is empty, the other value provided in the arguments.
Public Extension MethodFlattenFromRootToLeavesT(IEnumerableT, FuncT, IEnumerableT) Converts a recursive data structure into a flat list. The root element is enumerated before its corresponding child element(s).
Public methodStatic memberFlattenFromRootToLeavesT(T, FuncT, IEnumerableT) Converts a recursive data structure into a flat list. The root element is enumerated before its corresponding child element(s).
Public Extension MethodForEachDoT Executes an action for each element of the sequence.
Public Extension MethodGetDifferences(IEnumerableDouble) Gets the differences x[i+1] - x[i], for i = 0 .. x.Count-2.
Public Extension MethodGetDifferences(ReadOnlyMemoryDouble) Gets the differences x[i+1] - x[i], for i = 0 .. x.Count-2.
Public Extension MethodHasSingleElementT Determines whether the specified enumeration has exactly one element.
Public Extension MethodIndexOfMaxTReturn the index of the element with the maximum value in an enumerable. If multiple elements with the same minimal value exist, the index of the first element in the sequence is returned.
Public Extension MethodIndexOfMinTReturn the index of the element with the minimum value in an enumerable. If multiple elements with the same minimal value exist, the index of the first element in the sequence is returned.
Public Extension MethodIndicesInt32AndValuesWhereT(IEnumerableT, FuncT, Boolean) Returns tuples of index and element of all elements in an enumeration which fullfill a given condition, given by the element's value.
Public Extension MethodIndicesInt32AndValuesWhereT(IEnumerableT, FuncInt32, T, Boolean) Returns tuples of index and element of all elements in an enumeration which fullfill a given condition, given by the element's value and its index.
Public Extension MethodIndicesInt32WhereT(IEnumerableT, FuncT, Boolean) Returns the indices of the elements which fullfill a given condition, given by the element's value.
Public Extension MethodIndicesInt32WhereT(IEnumerableT, FuncInt32, T, Boolean) Returns the indices of the elements which fullfill a given condition, given by the element's value and its index.
Public Extension MethodIndicesOfMinMaxTReturn the index of the element with the minimum value in an enumerable. If multiple elements with the same minimal value exist, the index of the first element in the sequence is returned.
Public Extension MethodIsEmptyT Determines whether the specified enumeration is empty.
Public Extension MethodJoinConditionalT1, T2(IEnumerableT1, IEnumerableT2, FuncT1, T2, Boolean) Takes a join of two sequences, but only takes into account those pair, which fulfill a given condition.
Public Extension MethodJoinConditionalT1, T2, TResult(IEnumerableT1, IEnumerableT2, FuncT1, T2, Boolean, FuncT1, T2, TResult) Takes a join of two sequences, but only takes into account those pair, which fulfill a given condition.
Public Extension MethodLastOrT Returns the last value of the enumeration, or, if the enumeration is empty, the other value provided in the arguments.
Public Extension MethodMaxElementT, M Gets the element of a IEnumerabe that evaluates by means of a conversion function to the maximal value. This is different from Select(x => conversion(x)).Max() insofar as it not returns the maximum value, but the original element x which converts to the maximum value.
Public Extension MethodMaxOrDefaultT(IEnumerableT, T) Evaluates the maximum of a enumeration of elements, or returns a default value if the series is empty.
Public Extension MethodMaxOrDefaultT, M(IEnumerableT, FuncT, M, M) Evaluates the maximum of a enumeration of elements, or returns a default value if the series is empty.
Public Extension MethodMinOrDefaultT Evaluates the minimum of a enumeration of elements, or returns a default value if the series is empty.
Public methodStatic memberRangeDouble 
Public Extension MethodTakeAllButLastT Takes all elements of the enumeration except the last element.
Public Extension MethodTakeFromUpperIndexExclusiveDownToLowerIndexInclusiveT Takes all elements of a list, starting from index upperIndexExclusive - 1 down to the index lowerIndexInclusive.
Public Extension MethodTakeFromUpperIndexInclusiveDownToLowerIndexInclusiveT Takes all elements of a list, starting from index upperIndexInclusive down to the index lowerIndexInclusive.
Public Extension MethodThisOrEmptyT Returns either the provided enumeration, or if it is null, an empty enumeration.
Public Extension MethodTryGetFirstAndLastT Returns true and the first and last value of the enumeration, or, if the enumeration is empty, returns false.
Public Extension MethodTryGetSingleElementT Try to get the one and only element of the collection.
Top
See Also