Changeset 4eee8f for molecuilder/src/vector.cpp
- Timestamp:
- Apr 30, 2010, 10:07:23 AM (16 years ago)
- Children:
- 59e7832
- Parents:
- f70c2a
- File:
-
- 1 edited
-
molecuilder/src/vector.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/vector.cpp
rf70c2a r4eee8f 79 79 * \return \f$| x - y |\f$ 80 80 */ 81 double Vector:: Distance(const Vector &y) const81 double Vector::distance(const Vector &y) const 82 82 { 83 83 return (sqrt(DistanceSquared(y))); 84 84 }; 85 86 Vector Vector::getClosestPoint(const Vector &point) const{ 87 // the closest point to a single point space is always the single point itself 88 return *this; 89 } 85 90 86 91 /** Calculates distance between this and another vector in a periodic cell. … … 91 96 double Vector::PeriodicDistance(const Vector &y, const double * const cell_size) const 92 97 { 93 double res = Distance(y), tmp, matrix[NDIM*NDIM];98 double res = distance(y), tmp, matrix[NDIM*NDIM]; 94 99 Vector Shiftedy, TranslationVector; 95 100 int N[NDIM]; … … 115 120 Shiftedy = y + TranslationVector; 116 121 // get distance and compare with minimum so far 117 tmp = Distance(Shiftedy);122 tmp = distance(Shiftedy); 118 123 if (tmp < res) res = tmp; 119 124 }
Note:
See TracChangeset
for help on using the changeset viewer.
