Class: FeldtRuby::FastMap::DistanceFunction

Inherits:
Object
  • Object
show all
Defined in:
lib/feldtruby/statistics/fastmap.rb

Instance Method Summary collapse

Constructor Details

#initialize(&func) ⇒ DistanceFunction

Returns a new instance of DistanceFunction.



84
85
86
# File 'lib/feldtruby/statistics/fastmap.rb', line 84

def initialize(&func)
  @func = func
end

Instance Method Details

#calc(o1, o2) ⇒ Object



87
88
89
# File 'lib/feldtruby/statistics/fastmap.rb', line 87

def calc(o1, o2)
  @func.call(o1, o2)
end