Class: GSL::Vector

Inherits:
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



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

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

Instance Method Details

#_dump(_v) ⇒ Object



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

def _dump(_v)
  Marshal.dump(to_a)
end