Class: GSL::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



56
57
58
# File 'lib/gsl_extras.rb', line 56

def self._load(string)
	return self.alloc(Marshal.load(string))
end

Instance Method Details

#_dump(depth) ⇒ Object



53
54
55
# File 'lib/gsl_extras.rb', line 53

def _dump(depth)
	return Marshal.dump(self.to_a)
end

#inspectObject



59
60
61
# File 'lib/gsl_extras.rb', line 59

def inspect
	"GSL::Complex.alloc(#{self.to_a.inspect})"
end

#to_aObject



50
51
52
# File 'lib/gsl_extras.rb', line 50

def to_a
	return [self.real, self.imag]
end