TreeNodeExtensionsIsStructuralEquivalentToT, M Method |
Determines whether two trees are structurally equivalent by recursively comparing nodes and their children using a provided equivalence function.
Namespace: Altaxo.CollectionsAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntaxpublic static bool IsStructuralEquivalentTo<T, M>(
this T tree1,
M tree2,
Func<T, M, bool> AreNodesEquivalent
)
where T : Object, ITreeNode<T>
where M : Object, ITreeNode<M>
Parameters
- tree1 T
- The root node of the first tree.
- tree2 M
- The root node of the second tree.
- AreNodesEquivalent FuncT, M, Boolean
- Function to determine if two nodes are equivalent.
Type Parameters
- T
- Type of the first tree node.
- M
- Type of the second tree node.
Return Value
BooleanTrue if the trees are structurally equivalent; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
T. 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