Thomas Tsou | 20eb6d6 | 2013-11-09 14:30:41 -0500 | [diff] [blame] | 1 | #ifndef _SIGNALVECTOR_H_ |
| 2 | #define _SIGNALVECTOR_H_ |
| 3 | |
| 4 | #include <Vector.h> |
| 5 | #include <Complex.h> |
| 6 | |
| 7 | /** Vector symmetry */ |
| 8 | enum Symmetry { |
| 9 | NONE = 0, |
| 10 | ABSSYM = 1 |
| 11 | }; |
| 12 | |
| 13 | class signalVector: public Vector<complex> { |
| 14 | public: |
| 15 | /** Default constructor */ |
| 16 | signalVector(size_t size = 0); |
| 17 | |
| 18 | /** Construct with head room */ |
| 19 | signalVector(size_t size, size_t start); |
| 20 | |
| 21 | /** Construct from existing buffer data (buffer not managed) */ |
| 22 | signalVector(complex *data, size_t start, size_t span); |
| 23 | |
| 24 | /** Construct by from existing vector */ |
| 25 | signalVector(const signalVector &vector); |
| 26 | |
| 27 | /** Construct by from existing vector and append head-tail room */ |
| 28 | signalVector(const signalVector &vector, size_t start, size_t tail = 0); |
| 29 | |
| 30 | /** Override base assignment operator to include start offsets */ |
| 31 | void operator=(const signalVector& vector); |
| 32 | |
Alexander Chemeris | e56bf3a | 2017-03-17 22:34:20 -0700 | [diff] [blame^] | 33 | /** Return an alias to a segment of this signalVector. */ |
| 34 | signalVector segment(size_t start, size_t span); |
| 35 | |
Thomas Tsou | 20eb6d6 | 2013-11-09 14:30:41 -0500 | [diff] [blame] | 36 | /** Return head room */ |
| 37 | size_t getStart() const; |
Tom Tsou | 28670fb | 2015-08-21 19:32:58 -0700 | [diff] [blame] | 38 | size_t updateHistory(); |
Thomas Tsou | 20eb6d6 | 2013-11-09 14:30:41 -0500 | [diff] [blame] | 39 | |
| 40 | Symmetry getSymmetry() const; |
| 41 | void setSymmetry(Symmetry symmetry); |
| 42 | |
| 43 | bool isReal() const; |
| 44 | void isReal(bool real); |
| 45 | |
| 46 | bool isAligned() const; |
| 47 | void setAligned(bool aligned); |
| 48 | |
| 49 | private: |
Thomas Tsou | 20eb6d6 | 2013-11-09 14:30:41 -0500 | [diff] [blame] | 50 | bool real; |
| 51 | bool aligned; |
Thomas Tsou | 3f32ab5 | 2013-11-15 16:32:54 -0500 | [diff] [blame] | 52 | Symmetry symmetry; |
Thomas Tsou | 20eb6d6 | 2013-11-09 14:30:41 -0500 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | #endif /* _SIGNALVECTOR_H_ */ |