Class: GSL::Vector

Inherits:
Object
  • Object
show all
Defined in:
lib/classifier/extensions/vector_serialize.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

._load(arr) ⇒ Object



8
9
10
11
# File 'lib/classifier/extensions/vector_serialize.rb', line 8

def self._load(arr)
  arry = Marshal.load(arr)
  return GSL::Vector.alloc(arry)
end

Instance Method Details

#_dump(v) ⇒ Object



4
5
6
# File 'lib/classifier/extensions/vector_serialize.rb', line 4

def _dump(v)
  Marshal.dump( self.to_a )
end