Class: GSL::Matrix
- Inherits:
-
Object
- Object
- GSL::Matrix
- Defined in:
- lib/lsh/math_util_gsl.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.json_create(o) ⇒ Object
69 70 71 |
# File 'lib/lsh/math_util_gsl.rb', line 69 def self.json_create(o) alloc(*o['data']) end |
Instance Method Details
#hash ⇒ Object
73 74 75 |
# File 'lib/lsh/math_util_gsl.rb', line 73 def hash to_a.hash end |
#load(file) ⇒ Object
81 82 83 |
# File 'lib/lsh/math_util_gsl.rb', line 81 def load(file) fread(file) end |
#save(file) ⇒ Object
77 78 79 |
# File 'lib/lsh/math_util_gsl.rb', line 77 def save(file) fwrite(file) end |
#to_json(*a) ⇒ Object
62 63 64 65 66 67 |
# File 'lib/lsh/math_util_gsl.rb', line 62 def to_json(*a) { 'json_class' => self.class.name, 'data' => to_a, }.to_json(*a) end |