Skip to content

3.0.0

Latest

Choose a tag to compare

@DevAM-Tools DevAM-Tools released this 01 Dec 17:42

Refactor BKDTree to support custom metrics and improve performance

  • Updated MetricBKDTree and MetricKDTree to accept a metric struct implementing IDimensionalMetric for flexible distance calculations.
  • Removed unnecessary delegates for dimension retrieval, replacing them with direct metric calls to reduce overhead.
  • Introduced a thread-safe object pool for List<Segment> and Stack<Segment> to minimize allocations during bulk inserts.
  • Enhanced Option struct for better performance and usability, including methods to retrieve values without branching.
  • Added ValueEnumerator and ValueEnumerable structs for allocation-free iteration over KDTree values.
  • Updated README to reflect changes in API and usage instructions for new metric-based trees.