Class: RClusters::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/rclusters/base.rb

Direct Known Subclasses

ScreenDistance, SurfaceDistance

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Base

Returns a new instance of Base.



3
4
5
6
# File 'lib/rclusters/base.rb', line 3

def initialize(opts = {})
  @points = opts[:points]
  @max_distance = opts[:max_distance]
end

Instance Method Details

#calculate(points = nil, max_distance = nil, opts = {}) ⇒ Object



8
9
10
11
12
# File 'lib/rclusters/base.rb', line 8

def calculate(points = nil,max_distance = nil, opts={})
  points ||= @points
  max_distance ||= @max_distance
  cluster(points,max_distance,opts)
end