Documentation

BGW.Tree.ContourVertices

The contour as a walk on vertex addresses #

The contour starts at the root, traverses the children in order, and returns to the root after each child. Both endpoint visits are included. Projecting an address to its length gives the existing discrete height contour. Consecutive addresses are adjacent in the graph metric. The first occurrence of the vertex at DFS index i is at contour index 2 * i - depth; this refers to the address itself, not merely to its height.

Vertex addresses along the complete contour, including both endpoint visits.

Equations
Instances For

    Address depth is exactly the height recorded by the discrete contour.

    @[simp]

    Each edge is traversed twice and the initial root visit is also listed.

    An addition-only form of the contour length formula.

    The contour visits precisely the present vertex addresses.

    Successive contour visits are joined by one parent-child edge.

    The first contour visit plus vertex depth is twice the DFS index. This addition-only form certifies that the first-visit subtraction never truncates.

    The first visit to the address at DFS index i occurs at 2 * i - depth. idxOf? specifies both this occurrence and the absence of every earlier occurrence.

    At the first visit to a DFS vertex, the height contour records its depth.