Changes in src/vector.hpp [d4c9ae:0c7ed8]
- File:
-
- 1 edited
-
src/vector.hpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/vector.hpp
rd4c9ae r0c7ed8 16 16 17 17 #include <memory> 18 #include <vector> 18 19 19 20 #include "defs.hpp" … … 22 23 /********************************************** declarations *******************************/ 23 24 25 class Vector; 26 27 typedef std::vector<Vector> pointset; 28 24 29 /** Single vector. 25 30 * basically, just a x[3] but with helpful functions 26 31 */ 27 32 class Vector : public Space{ 28 protected:29 // this struct is used to indicate calls to the Baseconstructor from inside vectors.30 struct Baseconstructor{};31 33 public: 32 34 … … 39 41 40 42 double DistanceSquared(const Vector &y) const; 41 Vector GetDistanceVectorToPlane(const Vector &PlaneNormal, const Vector &PlaneOffset) const;42 43 double DistanceToSpace(const Space& space) const; 43 44 double PeriodicDistance(const Vector &y, const double * const cell_size) const; … … 56 57 void ProjectIt(const Vector &y); 57 58 Vector Projection(const Vector &y) const; 58 void Mirror(const Vector &x);59 59 void ScaleAll(const double *factor); 60 60 void Scale(const double factor); … … 66 66 bool IsInParallelepiped(const Vector &offset, const double * const parallelepiped) const; 67 67 void WrapPeriodically(const double * const M, const double * const Minv); 68 std::pair<Vector,Vector> partition(const Vector&) const; 69 std::pair<pointset,Vector> partition(const pointset&) const; 68 70 69 71 // Accessors ussually come in pairs... and sometimes even more than that … … 77 79 78 80 // Access to internal structure 79 double* get();81 gsl_vector* get(); 80 82 81 83 // Methods that are derived directly from other methods … … 102 104 103 105 private: 104 double x[NDIM];106 gsl_vector *content; 105 107 106 108 };
Note:
See TracChangeset
for help on using the changeset viewer.
