Click or drag to resize

EnumerableExtensionsFlattenFromRootToLeavesT(T, FuncT, IEnumerableT) Method

Converts a recursive data structure into a flat list. The root element is enumerated before its corresponding child element(s).

Namespace: Altaxo.Collections
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static IEnumerable<T> FlattenFromRootToLeaves<T>(
	T root,
	Func<T, IEnumerable<T>?> recursion
)

Parameters

root  T
The root element of the recursive data structure.
recursion  FuncT, IEnumerableT
The function that gets the children of an element. If no children of an element exist, the function is allowed to return null.

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "M:Altaxo.Collections.EnumerableExtensions.FlattenFromRootToLeaves``1(``0,System.Func{``0,System.Collections.Generic.IEnumerable{``0}})"]

Return Value

IEnumerableT
Iterator that enumerates the tree structure in preorder.
See Also