Class: FeldtRuby::FastMap::DistanceFunction
- Defined in:
- lib/feldtruby/statistics/fastmap.rb
Instance Method Summary collapse
- #calc(o1, o2) ⇒ Object
-
#initialize(&func) ⇒ DistanceFunction
constructor
A new instance of DistanceFunction.
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 |