Method: FeldtRuby::FastMap::PivotNode#fastmap_coordinate

Defined in:
lib/feldtruby/statistics/fastmap.rb

#fastmap_coordinate(o) ⇒ Object

Map an object to its coordinate in the dimension represented by this node.



26
27
28
# File 'lib/feldtruby/statistics/fastmap.rb', line 26

def fastmap_coordinate(o)
  ( @distance.calc(o, @pivot1) + @d_1_2_squared - @distance.calc(o, @pivot2) ) / @d_1_2_doubled
end