Components Interactions Examples Tutorials API FAQ
Options
Menu

Interface Tree

Type parameters

  • T

Hierarchy

  • Tree

Callable

  • __call(root: T, index?: number): T[]

Index

Methods

children

  • children(): function
  • children(children: function): Tree<T>
  • Returns function

      • (datum: T, index: number): T[]
      • Parameters

        • datum: T
        • index: number

        Returns T[]

  • Parameters

    • children: function
        • (datum: T, index: number): T[]
        • Parameters

          • datum: T
          • index: number

          Returns T[]

    Returns Tree<T>

links

  • links(nodes: T[]): Link<T>[]

nodeSize

  • nodeSize(): [number, number]
  • nodeSize(size: [number, number]): Tree<T>

nodes

  • nodes(root: T, index?: number): T[]

separation

  • separation(): function
  • separation(separation: function): Tree<T>
  • Returns function

      • (a: T, b: T): number
      • Parameters

        • a: T
        • b: T

        Returns number

  • Parameters

    • separation: function
        • (a: T, b: T): number
        • Parameters

          • a: T
          • b: T

          Returns number

    Returns Tree<T>

size

  • size(): [number, number]
  • size(size: [number, number]): Tree<T>

sort

  • sort(): function
  • sort(comparator: function): Tree<T>
  • Returns function

      • (a: T, b: T): number
      • Parameters

        • a: T
        • b: T

        Returns number

  • Parameters

    • comparator: function
        • (a: T, b: T): number
        • Parameters

          • a: T
          • b: T

          Returns number

    Returns Tree<T>

value

  • value(): function
  • value(value: function): Tree<T>
  • Returns function

      • (datum: T, index: number): number
      • Parameters

        • datum: T
        • index: number

        Returns number

  • Parameters

    • value: function
        • (datum: T, index: number): number
        • Parameters

          • datum: T
          • index: number

          Returns number

    Returns Tree<T>

Generated using TypeDoc