Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/vector.hpp

    rd4c9ae r0c7ed8  
    1616
    1717#include <memory>
     18#include <vector>
    1819
    1920#include "defs.hpp"
     
    2223/********************************************** declarations *******************************/
    2324
     25class Vector;
     26
     27typedef std::vector<Vector> pointset;
     28
    2429/** Single vector.
    2530 * basically, just a x[3] but with helpful functions
    2631 */
    2732class Vector : public Space{
    28 protected:
    29   // this struct is used to indicate calls to the Baseconstructor from inside vectors.
    30   struct Baseconstructor{};
    3133public:
    3234
     
    3941
    4042  double DistanceSquared(const Vector &y) const;
    41   Vector GetDistanceVectorToPlane(const Vector &PlaneNormal, const Vector &PlaneOffset) const;
    4243  double DistanceToSpace(const Space& space) const;
    4344  double PeriodicDistance(const Vector &y, const double * const cell_size) const;
     
    5657  void ProjectIt(const Vector &y);
    5758  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;
    6870
    6971  // Accessors ussually come in pairs... and sometimes even more than that
     
    7779
    7880  // Access to internal structure
    79   double* get();
     81  gsl_vector* get();
    8082
    8183  // Methods that are derived directly from other methods
     
    102104
    103105private:
    104   double x[NDIM];
     106  gsl_vector *content;
    105107
    106108};
Note: See TracChangeset for help on using the changeset viewer.