Class: Vector

Inherits:
Object
  • Object
show all
Extended by:
Clusterer::DocumentVector::ClassMethods
Includes:
Clusterer::DocumentVector::InstanceMethods
Defined in:
lib/clusterer/lsi/dmatrix.rb,
lib/clusterer/lsi/document_vector.rb

Instance Attribute Summary

Attributes included from Clusterer::DocumentVector::InstanceMethods

#position

Instance Method Summary collapse

Methods included from Clusterer::DocumentVector::ClassMethods

centroid_class

Methods included from Clusterer::DocumentVector::InstanceMethods

#cosine_similarity

Instance Method Details

#/(x) ⇒ Object



129
130
131
# File 'lib/clusterer/lsi/dmatrix.rb', line 129

def / (x)
  self * (1/x)
end

#dimensionsObject



125
126
127
# File 'lib/clusterer/lsi/dmatrix.rb', line 125

def dimensions
  [size]
end

#transposeObject



121
122
123
# File 'lib/clusterer/lsi/dmatrix.rb', line 121

def transpose
  self
end