Options
All
  • Public
  • Public/Protected
  • All
Menu

A node in the cluster.

Nodes wrap the points of arbitrary types, and can form groups of neighboring nodes to form a cluster. For a cluster, the nodes property will have entries.

Type Parameters

  • T

    The type of a point.

Hierarchy

  • Node

Index

Constructors

  • Create a new node.

    Type Parameters

    • T

      The type of a point.

    Parameters

    • point: Point

      The cartesian point for the coordinate.

    • coordinate: Coordinate

      The latitude and longitude.

    • nodes: Node<T>[]

      The nodes contained by this node, if any.

    • parent: null | Node<T>

      The parent of this node, if the node is part of a cluster.

    • data: T

      The data for the node.

    Returns Node<T>

Properties

coordinate: Coordinate

The world coordinate in latitude and longitude.

data: T

The data for the point.

nodes: Node<T>[]

The nodes contained by this node, if it is a cluster.

parent: null | Node<T>

The parent node, if this node is a member of a cluster.

point: Point

The cartesian point derived fro the coordinate.

Methods

  • count(): number
  • If the node is not part of a cluster the count will be 1. If the node contains a cluster it will be the sum of the count of all contained nodes.

    Returns number

    The number of nodes at this point.

  • Return all of the leaf nodes from this node.

    Returns Node<T>[]

    An array of leaf nodes.

Generated using TypeDoc