documentationfor yFiles for HTML 2.6

TreeAlgorithm

This class provides diverse algorithms and services for tree-structured graphs or subgraphs.

Inheritance Hierarchy
TreeAlgorithm

Remarks

Note: Methods of this class work with instances of Graph. To analyze IGraph instances that are directed trees use TreeAnalyzer instead.

Definitions

  • Tree: An acyclic graph, in which any pair of vertices (nodes) is connected through a path. If one vertex of a tree is distinguished from the other vertices, then this vertex is called the root and the tree is called a rooted tree.
  • Directed rooted tree: A rooted tree where edges are directed from the root to the leaves.
  • Depth: The depth of a vertex in a rooted tree is the number of edges of the unique path between this vertex and the root.
  • Parent: In a rooted tree a vertex v is called parent of a vertex w if v and w are adjacent (i.e. connected by an edge) and the unique path between w and the root contains v. Note that each vertex except the root has exactly one parent.
  • Children: In a rooted tree a vertex w is called child of a vertex v if v is the parent of w. A vertex may have several children.
  • N-ary tree: A directed rooted tree where each node has a maximum of n children.
  • Forest: A graph whose connected components are trees.
  • Leaf: A leaf v is a node with out-degree (i.e., the number of edges having v as a target) zero if the input is a directed rooted tree, and a node with degree (i.e., the number of edges incident to v) one, otherwise.
  • Subtree: A subtree of a tree T is a subgraph of T which is also a tree.
  • Nearest or Lowest or Least common ancestor: The nearest common ancestor of two nodes u and v in a tree graph is the shared ancestor of u and v that is located farthest from the root.
  • Eccentricity: The eccentricity of a tree node is the maximum distance to any other node.
  • Center node: The center of a tree is the set of nodes that have minimal eccentricity.

Type Details

yfiles module
algorithms
yfiles-umd modules
All layout modules, view-layout-bridge
Legacy UMD name
yfiles.algorithms.Trees

Static Methods