// CVTR.H #ifndef CVTR_H #define CVTR_H #include "complex.h" #include "vtr.h" #include "dgtd-performance.hpp" class cVtr { friend class cTensor; friend Complex dotP(cVtr, vtr); friend Complex dotP(cVtr, cVtr); public: Complex x, y, z; public: cVtr(); cVtr(Complex, Complex, Complex); void reset(); void setcvtr(Complex, Complex, Complex); void Negate(); // operators cVtr operator+(const cVtr &) const; cVtr operator-(const cVtr &) const; cVtr operator*(const fp_t &) const; cVtr operator*(const Complex &) const; cVtr operator*(const cVtr &) const; cVtr operator*(const vtr &) const; cVtr operator/(const fp_t &) const; cVtr& operator=(const cVtr &); cVtr& operator=(const vtr &); fp_t magnitude(); fp_t magSquare(); void Conjugate(); // get functions Complex getx(), gety(), getz(); Complex getx() const { return x; } Complex gety() const { return y; } Complex getz() const { return z; } cVtr cross(const vtr& b) const; // print function void print(); }; #endif