KDTree class Null safety

Constructors

KDTree(List<Map> points, Function? _metric, List<String> _dimensions)
KDTree.fromJson(Map<String, dynamic> json)

Properties

dimensions List<String>
Return dimensions that was setted on Tree creation
read-only
hashCode int
The hash code for this object.
read-onlyinherited
height int
Calculate height of K-d Tree
read-only
length int
Calculate lenght of K-d Tree
read-only
metric Function?
Set the new metric function. This must be done after JSON deserialization since JSON can't serialize Function.
write-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

balanceFactor() double
Calculate balance factor of K-d Tree
insert(dynamic point) → void
nearest(dynamic point, int maxNodes, [int? maxDistance]) List
Find the maxNodes of nearest Nodes. Distance is calculated via Metric function. Max distance can be set with maxDistance param
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
remove(dynamic point) → void
Remove the Node from the K-d Tree
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited