Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/vector.hpp

    r0c7ed8 rd4c9ae  
    1616
    1717#include <memory>
    18 #include <vector>
    1918
    2019#include "defs.hpp"
     
    2322/********************************************** declarations *******************************/
    2423
    25 class Vector;
    26 
    27 typedef std::vector<Vector> pointset;
    28 
    2924/** Single vector.
    3025 * basically, just a x[3] but with helpful functions
    3126 */
    3227class Vector : public Space{
     28protected:
     29  // this struct is used to indicate calls to the Baseconstructor from inside vectors.
     30  struct Baseconstructor{};
    3331public:
    3432
     
    4139
    4240  double DistanceSquared(const Vector &y) const;
     41  Vector GetDistanceVectorToPlane(const Vector &PlaneNormal, const Vector &PlaneOffset) const;
    4342  double DistanceToSpace(const Space& space) const;
    4443  double PeriodicDistance(const Vector &y, const double * const cell_size) const;
     
    5756  void ProjectIt(const Vector &y);
    5857  Vector Projection(const Vector &y) const;
     58  void Mirror(const Vector &x);
    5959  void ScaleAll(const double *factor);
    6060  void Scale(const double factor);
     
    6666  bool IsInParallelepiped(const Vector &offset, const double * const parallelepiped) const;
    6767  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;
    7068
    7169  // Accessors ussually come in pairs... and sometimes even more than that
     
    7977
    8078  // Access to internal structure
    81   gsl_vector* get();
     79  double* get();
    8280
    8381  // Methods that are derived directly from other methods
     
    104102
    105103private:
    106   gsl_vector *content;
     104  double x[NDIM];
    107105
    108106};
Note: See TracChangeset for help on using the changeset viewer.