Class: GSL::Vector::Complex

Inherits:
Object
  • Object
show all
Defined in:
lib/gsl_extras.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

._load(string) ⇒ Object



67
68
69
70
# File 'lib/gsl_extras.rb', line 67

def self._load(string)
	re, im = Marshal.load(string)
	return self.alloc(re.zip(im))
end

Instance Method Details

#_dump(depth) ⇒ Object



64
65
66
# File 'lib/gsl_extras.rb', line 64

def _dump(depth)
	return Marshal.dump([self.real.to_a, self.imag.to_a])
end

#inspectObject



71
72
73
74
# File 'lib/gsl_extras.rb', line 71

def inspect
	re, im = [self.real.to_a, self.imag.to_a]
	"GSL::Vector::Complex.alloc(#{re.zip(im).inspect})"
end