This interface encapsulates a cluster of data points, which fulfill the clustering specification (the data points are within the epsilon and there are enough points to form a cluster).
We can make an analogue with a Tree. In that case, the given cluster is a node in a tree, children of that node are sub-clusters and leaves of that sub-tree are the noise points.
Sub-clusters of a cluster can be seen on a map when changing the zoom level, as parent clusters split into smaller clusters and possible noise points.
Extends
Methods
-
This method invokes the specified callback for each data point in the given cluster. In an analogy to the example from the class description, the method traverses only through the leaf nodes of the tree.
Name Type Description callbackfunction(H.clustering.INoisePoint) The callback to invoke. It receives the currently traversed noise point as argument.
-
This method invokes the specified callback for each "entry" of the cluster. That "entry" can be either a cluster which implements
H.clustering.IClusterinterface or a noise point which implementsH.clustering.INoisePointinterface. In an analogy to the example from the class description, the method traverses through all nodes of the tree beside the root.Name Type Description callbackfunction(H.clustering.IResult) The callback to invoke. It receives the currently traversed entry as an argument, which is cluster or noise point
-
getBoundingBox ()H.geo.Rect
-
This method retrieves the rectangular bounding box of the given cluster.
Returns:
Type Description H.geo.Rect An object representing the bounding rectangle for the cluster -
This method retrieves the maximum zoom level at which the given cluster does not break up into into sub-clusters and/or noise points.
Returns:
Type Description number A value indicating the highest zoom level at which the given cluster does not break into sub-clusters and/or noise points -
getMinZoom ()number inherited
-
This method retrieves the minimum zoom level at which the given item is not part of another cluster.
Returns:
Type Description number A value indicating the minimum zoom level -
getPosition ()H.geo.Point inherited
-
This method retrieves the geographical position of the cluster result.
Returns:
Type Description H.geo.Point An object containing the geographical coordinates of the location. -
getWeight ()number inherited
-
This method retrieves the weight of the cluster result.
Returns:
Type Description number A value indicating the weight of the cluster result. -
isCluster ()boolean inherited
-
This method retrieves a value indicating whether the cluster result is a cluster or a noise point.
Returns:
Type Description boolean trueif the result is a cluster, otherwisefalse