public class KdTree : IDimensional
Represents an immutable kD-tree associated with a sample set.

Constructors

KdTree

#
Create a new kD tree.
public KdTree(
parentSet,
Sample set associated with this tree.
maximumCount,
Maximum number of samples per spatial region.
maximumDepth
Maximum number of hierarchical subdivisions.
)

KdTree

#
Create a new kD tree.
public KdTree(
parentSet
Sample set associated with this tree.
)

Properties

Description

#
Gets a description of this object type.
public string Description { get; }
Description

Dimensionality

#
Gets the dimensionality of this object.
public int Dimensionality { get; }
Dimensionality

LeafCount

#
Gets the total number of leaf nodes in this tree.
public int LeafCount { get; }

NodeCount

#
Gets the total number of nodes in this tree.
public int NodeCount { get; }

ParentSet

#
Gets the sample set associated with this cluster.
public ISampleSet ParentSet { get; }

Methods

AddToRhino

#
Adds the first 3 dimensions of this tree to Rhino. This is for debugging purposes.
[EditorBrowsable(EditorBrowsableState.Never)] public Guid[] AddToRhino(
doc
Doc to add to.
)
List of objects ids that were added.

Find

#
Find the closest point.
public int Find(
location,
Location to search from.
minimumQuadrance,
Points whose quadrance is less than this value will be omitted from the search.
maximumQuadrance,
Points whose quadrance is greater than this value will be omitted from the search.
indexFilter
Optional collection of indices to ignore during the search.
)
Index to closest point.

FindMultiple

#
Find the element(s) closest to a search point.
public KdTreeSearchResults FindMultiple(
location,
Search location.
maximumCount,
Maximum number of points to include in the result.
minimumQuadrance,
Points whose quadrance is less than this value will be omitted from the search.
maximumQuadrance,
Points whose quadrance is greater than this value will be omitted from the search.
indexFilter
Collection of indices to omit from the search.
)
Search results.

FindMultiple

#
Find the element(s) closest to a search point.
public KdTreeSearchResults FindMultiple(
location,
Search location.
maximumCount,
Maximum number of points to include in the result.
minimumQuadrance,
Points whose quadrance is less than this value will be omitted from the search.
maximumQuadrance
Points whose quadrance is greater than this value will be omitted from the search.
)
Search results.

FindMultiple

#
Find the element(s) closest to a search point.
public KdTreeSearchResults FindMultiple(
location,
Search location.
maximumCount
Maximum number of points to include in the result.
)
Search results.

LeafMeans

#
Return all leaf means.
public PointN[] LeafMeans(
precedence,
Enumeration order.
type
Mean type.
)
Sorted collection of leaf means.

MergeLeaves

#
Reduce the leaf count of this tree to a specific target.
public KdTree MergeLeaves(
leafTarget,
Target count.
precedence
Merging precedence.
)
Reduced tree.

Pull

#
Pull a collection of points onto the points.
public int[] Pull(
points,
Points to pull.
reusePoints
If true, more than one point may be pulled onto the same tree point.
)
Pulled points.

SuperImpose

#
Find the closest point in another tree for every point in this tree.
public int[] SuperImpose(
otherTree
Tree to match.
)
An array of integers, specifying for each point in this tree what point in the other tree is closest.