Class: GSL::Vector

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

._load(arr) ⇒ Object



9
10
11
12
# File 'lib/classifier-reborn/extensions/vector_serialize.rb', line 9

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

Instance Method Details

#_dump(_v) ⇒ Object



5
6
7
# File 'lib/classifier-reborn/extensions/vector_serialize.rb', line 5

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