Changeset 8c01ce for molecuilder/src/vector.hpp
- Timestamp:
- May 8, 2010, 10:05:35 AM (16 years ago)
- Children:
- abde75
- Parents:
- 1775d3 (diff), 25e17e9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
molecuilder/src/vector.hpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/vector.hpp
r1775d3 r8c01ce 18 18 19 19 #include "defs.hpp" 20 #include "Space.hpp" 20 21 21 22 /********************************************** declarations *******************************/ … … 24 25 * basically, just a x[3] but with helpful functions 25 26 */ 26 class Vector {27 class Vector : public Space{ 27 28 protected: 28 29 // this struct is used to indicate calls to the Baseconstructor from inside vectors. … … 79 80 80 81 // Methods that are derived directly from other methods 81 double Distance(const Vector &y) const;82 82 double Norm() const; 83 83 double NormSquared() const; … … 89 89 // operators for mathematical operations 90 90 bool operator==(const Vector& b) const; 91 bool operator!=(const Vector& b) const; 91 92 const Vector& operator+=(const Vector& b); 92 93 const Vector& operator-=(const Vector& b); 93 94 Vector const operator+(const Vector& b) const; 94 95 Vector const operator-(const Vector& b) const; 96 97 // Methods inherited from Space 98 virtual double distance(const Vector &point) const; 99 virtual Vector getClosestPoint(const Vector &point) const; 95 100 96 101 protected: … … 101 106 }; 102 107 108 // some commonly used and fixed vectors 109 const extern Vector zeroVec; 110 const extern Vector e1; 111 const extern Vector e2; 112 const extern Vector e3; 113 103 114 ostream & operator << (ostream& ost, const Vector &m); 104 115 const Vector& operator*=(Vector& a, const double m);
Note:
See TracChangeset
for help on using the changeset viewer.
