Skip to content

TreePartitionNode

jay19240 edited this page Dec 19, 2024 · 3 revisions

TreePartitionNode

The node in a binary tree partition data structure.

Constructors

  • new TreePartitionNode(tree: TreePartition, depth: number, method: ITreePartitionMethod): TreePartitionNode
    • tree: The root partition binary tree.
    • depth: The depth of that node.
    • method: Defines a method that is responsible for partitioning the tree nodes.

Methods

  • addChild(object: T): void
    • object: The object.
  • draw(): void
  • getChildren()
  • getDepth(): number
  • getLeft()
  • getMethod(): ITreePartitionMethod
  • getRight()
  • reset(): void
  • search(target: T, results: T[])
    • target: The target object.
    • results: All matching objects.
  • setDepth(depth: number): void
    • depth: The depth value.
  • translate(x: number, y: number, z: number): void
    • x: The amount of translation in the x-axis direction.
    • y: The amount of translation in the y-axis direction.
    • z: The amount of translation in the z-axis direction.
Clone this wiki locally