Class methods

  1. With two (real) vectors:

    >> re = Vector[0..3]
    >> im = Vector[5..8]
    >> z = Vector::Complex[re, im]
    [ [0.000e+00 5.000e+00] [1.000e+00 6.000e+00] [2.000e+00 7.000e+00] [3.000e+00 8.000e+00] ]
  2. With arrays

    >> z = Vector::Complex.alloc([0, 1], [2, 5], [-3, 4])
    [ [0.000e+00 1.000e+00] [2.000e+00 5.000e+00] [-3.000e+00 4.000e+00] ]

Instance methods

Accessing vector elements

Initializing vector elements

Vector Properties


Reordering Elements

GSL::Vector::Complex provides four methods for shifting the frequency domain data between FFT order, shown in the table in the Overview of complex data FFTs, and natural order, which has the most negative freqeuncy component first, the zero frequency component in the middle, and the most positive frequency component last. For more information on Ruby/GSL and FFTs, see Fast Fourier Transforms.


Reading and writing vectors



Data Conversions

Reference index top