Class: PSPLINE::Rfft

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) ⇒ Rfft

Returns a new instance of Rfft.



8
9
10
# File 'lib/pspline.rb', line 8

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

Instance Method Details

#[](t) ⇒ Object



11
12
13
# File 'lib/pspline.rb', line 11

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

#axisObject



18
19
20
# File 'lib/pspline.rb', line 18

def axis
	@V.dup
end

#backwordObject



24
25
26
# File 'lib/pspline.rb', line 24

def backword
	fft_real_transform(self, 0)
end

#inverseObject



21
22
23
# File 'lib/pspline.rb', line 21

def inverse
	fft_real_transform(self, -1)
end

#spline(order:) ⇒ Object



14
15
16
17
# File 'lib/pspline.rb', line 14

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