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