Changeset 71910a for molecuilder/src/vector.hpp
- Timestamp:
- Apr 7, 2010, 3:45:38 PM (16 years ago)
- Children:
- 0f55b2
- Parents:
- 770138
- File:
-
- 1 edited
-
molecuilder/src/vector.hpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/vector.hpp
r770138 r71910a 24 24 class Vector { 25 25 public: 26 double x[NDIM];27 26 28 27 Vector(); 29 28 Vector(const double x1, const double x2, const double x3); 29 Vector(const Vector& src); 30 30 ~Vector(); 31 31 … … 48 48 void CopyVector(const Vector * const y); 49 49 void CopyVector(const Vector &y); 50 void RotateVector(const Vector * const y, const double alpha);51 50 void VectorProduct(const Vector * const y); 52 51 void ProjectOntoPlane(const Vector * const y); … … 63 62 void Scale(const double factor); 64 63 void MatrixMultiplication(const double * const M); 65 voidInverseMatrixMultiplication(const double * const M);64 bool InverseMatrixMultiplication(const double * const M); 66 65 void KeepPeriodic(const double * const matrix); 67 66 void LinearCombinationOfVectors(const Vector * const x1, const Vector * const x2, const Vector * const x3, const double * const factors); 68 67 double CutsPlaneAt(const Vector * const A, const Vector * const B, const Vector * const C) const; 69 bool GetIntersectionWithPlane(const Vector * const PlaneNormal, const Vector * const PlaneOffset, const Vector * const Origin, const Vector * const LineVector);70 bool GetIntersectionOfTwoLinesOnPlane(const Vector * const Line1a, const Vector * const Line1b, const Vector * const Line2a, const Vector * const Line2b, const Vector *Normal = NULL);71 68 bool GetOneNormalVector(const Vector * const x1); 72 bool MakeNormalVector(const Vector * const y1); 73 bool MakeNormalVector(const Vector * const y1, const Vector * const y2); 74 bool MakeNormalVector(const Vector * const x1, const Vector * const x2, const Vector * const x3); 75 bool SolveSystem(Vector * x1, Vector * x2, Vector * y, const double alpha, const double beta, const double c); 76 bool LSQdistance(const Vector ** vectors, int dim); 77 void AskPosition(const double * const cell_size, const bool check); 78 void Output() const; 69 bool MakeNormalTo(const Vector &y1); 70 //bool SolveSystem(Vector * x1, Vector * x2, Vector * y, const double alpha, const double beta, const double c); 79 71 bool IsInParallelepiped(const Vector &offset, const double * const parallelepiped) const; 80 72 void WrapPeriodically(const double * const M, const double * const Minv); 73 74 // Accessors ussually come in pairs... and sometimes even more than that 75 double& operator[](size_t i); 76 const double& operator[](size_t i) const; 77 double& at(size_t i); 78 const double& at(size_t i) const; 79 80 // Assignment operator 81 Vector &operator=(const Vector& src); 82 83 // Access to internal structure 84 double* get(); 85 86 private: 87 double x[NDIM]; 81 88 82 89 };
Note:
See TracChangeset
for help on using the changeset viewer.
