TreeComparer<TNode> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Implements a tree differencing algorithm.
generic <typename TNode>
public ref class TreeComparer abstract
public abstract class TreeComparer<TNode>
type TreeComparer<'Node> = class
Public MustInherit Class TreeComparer(Of TNode)
Type Parameters
- TNode
Tree node.
- Inheritance
-
TreeComparer<TNode>
Remarks
Subclasses define relationships among tree nodes, and parameters to the differencing algorithm.
Constructors
TreeComparer<TNode>() |
Properties
LabelCount |
The number of distinct labels used in the tree. |
Methods
ComputeEditScript(TNode, TNode) |
Returns an edit script that transforms |
ComputeMatch(TNode, TNode, IEnumerable<KeyValuePair<TNode,TNode>>) |
Returns a match map of |
GetChildren(TNode) |
May return null if the |
GetDescendants(TNode) |
Enumerates all descendant nodes of the given node in depth-first prefix order. |
GetDistance(TNode, TNode) |
Calculates the distance [0..1] of two nodes. |
GetLabel(TNode) |
Returns an integer label corresponding to the given node. |
GetSpan(TNode) |
Returns the position of the node. |
TiedToAncestor(Int32) |
Returns N > 0 if the node with specified label can't change its N-th ancestor node, zero otherwise. |
TreesEqual(TNode, TNode) |
Return true if specified nodes belong to the same tree. |
TryGetParent(TNode, TNode) |
Returns a parent for the specified node. |
ValuesEqual(TNode, TNode) |
Returns true if the specified nodes have equal values. |
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for