#ifndef STARLAB_VECTOR_H # define STARLAB_VECTOR_H #define PR(x) cerr << #x << " = " << x << " " #define PRC(x) cerr << #x << " = " << x << ", " #define PRL(x) cerr << #x << " = " << x << "\n" #ifndef real # define real double #endif /*----------------------------------------------------------------------------- * mvector -- a class for 3-dimensional vectors *----------------------------------------------------------------------------- */ class mvector { private: real element[VLEN]; public: // Default: initialize to zero. mvector(real c = 0) {for (int i = 0; i> (istream & , mvector & ); }; inline ostream & operator << (ostream & s, const mvector & v) { for(int i = 0; i> (istream & s, mvector & v) {for(int i = 0; i> v.element[i]; return s;} inline const mvector operator + (const mvector &v1, const mvector & v2) { mvector v3; for(int i = 0; i