Class: KMeansPP::Point
Overview
Point of the data set.
Instance Attribute Summary collapse
-
#group ⇒ Centroid
Group is a centroid point.
-
#original ⇒ Object
The original object (could be anything from Hash to an Object).
Instance Method Summary collapse
-
#initialize(x = 0.0, y = 0.0, group = nil) ⇒ Point
constructor
Create a new point (data set point or a centroid).
Constructor Details
#initialize(x = 0.0, y = 0.0, group = nil) ⇒ Point
Create a new point (data set point or a centroid).
49 50 51 52 53 |
# File 'lib/k_means_pp/point.rb', line 49 def initialize(x = 0.0, y = 0.0, group = nil) self.x = x self.y = y self.group = group end |
Instance Attribute Details
#group ⇒ Centroid
Group is a centroid point.
37 38 39 |
# File 'lib/k_means_pp/point.rb', line 37 def group @group end |
#original ⇒ Object
The original object (could be anything from Hash to an Object).
42 43 44 |
# File 'lib/k_means_pp/point.rb', line 42 def original @original end |