Class: Kmeans::Bicluster

Inherits:
Object
  • Object
show all
Defined in:
lib/kmeans/hcluster.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vec, left = nil, right = nil, distance = 0.0, id = nil) ⇒ Bicluster

Returns a new instance of Bicluster.


5
6
7
8
9
10
11
# File 'lib/kmeans/hcluster.rb', line 5

def initialize(vec, left=nil, right=nil, distance=0.0, id=nil)
  @left = left
  @right = right
  @vec = vec
  @id = id
  @distance = distance
end

Instance Attribute Details

#distanceObject

Returns the value of attribute distance


13
14
15
# File 'lib/kmeans/hcluster.rb', line 13

def distance
  @distance
end

#idObject

Returns the value of attribute id


13
14
15
# File 'lib/kmeans/hcluster.rb', line 13

def id
  @id
end

#leftObject

Returns the value of attribute left


13
14
15
# File 'lib/kmeans/hcluster.rb', line 13

def left
  @left
end

#rightObject

Returns the value of attribute right


13
14
15
# File 'lib/kmeans/hcluster.rb', line 13

def right
  @right
end

#vecObject

Returns the value of attribute vec


13
14
15
# File 'lib/kmeans/hcluster.rb', line 13

def vec
  @vec
end