Class: PSPLINE::Cfft

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

Instance Method Summary collapse

Methods inherited from Array

#fft_complex_forward, #fft_real_forward

Constructor Details

#initialize(data) ⇒ Cfft

Returns a new instance of Cfft.



32
33
34
# File 'lib/pspline.rb', line 32

def initialize(data)
	super(fft_complex_transform(data, 1))
end

Instance Method Details

#[](t) ⇒ Object



35
36
37
# File 'lib/pspline.rb', line 35

def [] (t)
	fft_complex_get(self, t)
end

#axisObject



48
49
50
# File 'lib/pspline.rb', line 48

def axis
	@V.dup
end

#backwordObject



45
46
47
# File 'lib/pspline.rb', line 45

def backword
	fft_real_transform(self, 0)
end

#imageObject



54
55
56
# File 'lib/pspline.rb', line 54

def image
	self.last.dup
end

#inverseObject



42
43
44
# File 'lib/pspline.rb', line 42

def inverse
	fft_complex_transform(self, -1)
end

#realObject



51
52
53
# File 'lib/pspline.rb', line 51

def real
	self.first.dup
end

#spline(order:) ⇒ Object



38
39
40
41
# File 'lib/pspline.rb', line 38

def spline order:
	@V = []
	fft_complex_bspline(self, order) {|t, z| @V.push t}
end