API
    Preparing search index...

    Class Node

    Index

    Constructors

    • The constructor of the Node class.

      Parameters

      • id: number

        node id number

      Returns Node

    Properties

    annotation: { [key: string]: any }

    Node annotation(s)

    branchLength: undefined | number

    Length of descending branch

    children: Node[]

    descending nodes

    height: undefined | number

    Heigh above the root

    hybridID: undefined | number

    ID of node if hybrid

    id: number

    Node id

    label: undefined | string

    Node label

    parent: undefined | Node

    Node parent

    rttDist: undefined | number

    Root to tip distance for each tip

    Methods

    • Appends child node to children

      Parameters

      Returns void

    • Apply a function f() to each node in a subtree descending from node in post-order

      Type Parameters

      • T

      Parameters

      Returns T[]

    • Apply a function f() to each node in a subtree descending from node in pre-order

      Type Parameters

      • T

      Parameters

      Returns T[]

    • Gets ancestral nodes. Wraps _getAncestors to handle concat types.

      Returns Node[]

    • Checks if a node is a hybrid node

      Returns boolean

    • Check if a node is a Leaf

      Returns boolean

    • Returns true if this node is left of the argument on the tree. If one node is the direct ancestor of the other, the result is undefined.

      Parameters

      Returns undefined | boolean

    • Checks if a node is root

      Returns boolean

    • Checks if node only has one child

      Returns boolean

    • Removes a node from children

      Parameters

      Returns void

    • Ensure nodes with unique IDs have unique hashes.

      Returns string