Class: GSL::TensorComplex

Inherits:
Tensor
  • Object
show all
Defined in:
lib/gs2crmod/gsl_data_3d.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Tensor

#[], #[]=, #initialize, #inspect, #iterate, #iterate_row_maj, method_missing, #method_missing, #reshape!, #shape, #to_a, #transpose

Constructor Details

This class inherits a constructor from GSL::Tensor

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class GSL::Tensor

Instance Attribute Details

#narrayObject (readonly)

Returns the value of attribute narray.



117
118
119
# File 'lib/gs2crmod/gsl_data_3d.rb', line 117

def narray
  @narray
end

Class Method Details

.alloc(*args) ⇒ Object



118
119
120
# File 'lib/gs2crmod/gsl_data_3d.rb', line 118

def self.alloc(*args)
	new(NArray.complex(*args.reverse))
end

Instance Method Details

#absObject



124
125
126
# File 'lib/gs2crmod/gsl_data_3d.rb', line 124

def abs
	GSL::Tensor.new(@narray.abs)
end

#realObject



121
122
123
# File 'lib/gs2crmod/gsl_data_3d.rb', line 121

def real
	GSL::Tensor.new(@narray.real)
end