QuaternionFT.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2005 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/Util/fft/QuaternionFT.h
10
11#ifndef __QuaternionFT_H
12#define __QuaternionFT_H
13
14#include "Quaternion.h"
15#include "Matrix.h"
16#include <vector>
17
18class QuaternionFT {
19
20public:
21
22 enum Direction { Forward, Backward };
23
25 static bool verbose;
26
28 QuaternionFT ();
29
31 QuaternionFT (double theta, double phi);
32
34 void set_axis (double theta, double phi);
35
37 void set_axis (Vector<3,float> axis);
38
40 void set_power (double power);
43 void set_extent (double extent);
44
46 Vector<3,float> get_axis () const;
47
49 void set_direction (Direction direction);
50
52 void fft (const std::vector<Quaternion<float> >& in,
53 std::vector<Quaternion<float> >& out);
54
55 void fft (unsigned npt, const Quaternion<float>* in, Quaternion<float>* out);
56
57 void fft (unsigned npt, const float* input, float* output);
58
59
61 void ft (const std::vector<Quaternion<float> >& in,
62 std::vector<Quaternion<float> >& out);
63
64 void ft (unsigned npt, const Quaternion<float>* in, Quaternion<float>* out);
65
66 void ft (unsigned npt, const float* input, float* output);
67
68protected:
69
71 Quaternion<float> mu[3];
72
74 Matrix<3,3,float> xform;
75
77 float sign;
78
80 void set_xform ();
81
83 double power, extent;
84
85};
86
87#endif
88

Generated using doxygen 1.14.0