|
KDTreeFromDataT Method (Double, T, IMetricDouble, Boolean)
|
Creates a new k-dimensional tree from the given points.
Namespace:
Accord.Collections
Assembly:
Accord.MachineLearning (in Accord.MachineLearning.dll) Version: 3.8.0
Syntax public static KDTree<T> FromData<T>(
double[][] points,
T[] values,
IMetric<double[]> distance,
bool inPlace = false
)
Public Shared Function FromData(Of T) (
points As Double()(),
values As T(),
distance As IMetric(Of Double()),
Optional inPlace As Boolean = false
) As KDTree(Of T)
Request Example
View SourceParameters
- points
- Type: SystemDouble
The points to be added to the tree. - values
- Type: T
The corresponding values at each data point. - distance
- Type: Accord.Math.DistancesIMetricDouble
The distance function to use. - inPlace (Optional)
- Type: SystemBoolean
Whether the given points vector
can be ordered in place. Passing true will change the original order of
the vector. If set to false, all operations will be performed on an extra
copy of the vector.
Type Parameters
- T
- The type of the value to be stored.
Return Value
Type:
KDTreeTA
KDTreeT populated with the given data points.
See Also