|
VPTreeFromDataTPoint, TData Method (TPoint, TData, IDistanceTPoint, Boolean)
|
Creates a new vantage-point tree from the given points.
Namespace:
Accord.Collections
Assembly:
Accord.MachineLearning (in Accord.MachineLearning.dll) Version: 3.8.0
Syntax public static VPTree<TPoint, TData> FromData<TPoint, TData>(
TPoint[] points,
TData[] values,
IDistance<TPoint> distance,
bool inPlace = false
)
Public Shared Function FromData(Of TPoint, TData) (
points As TPoint(),
values As TData(),
distance As IDistance(Of TPoint),
Optional inPlace As Boolean = false
) As VPTree(Of TPoint, TData)
Request Example
View SourceParameters
- points
- Type: TPoint
The points to be added to the tree. - values
- Type: TData
The corresponding values at each data point. - distance
- Type: Accord.Math.DistancesIDistanceTPoint
The distance function to use. - inPlace (Optional)
- Type: SystemBoolean
Whether to perform operations in place, altering the
original array of points instead of creating an extra copy.
Type Parameters
- TPoint
- The type for the position vectors.
- TData
- The type of the value to be stored.
Return Value
Type:
VPTreeTPoint,
TDataA
VPTreeTPoint, TData populated with the given data points.
See Also