14 #ifndef BASICTOOL_GEOTRAJECTORY_H
15 #define BASICTOOL_GEOTRAJECTORY_H
27 class Trajectory :
public std::vector<geoalgo::Vector> {
32 Trajectory(
size_t npoints=0,
size_t ndimension=0);
41 Trajectory(
const std::vector<geoalgo::Point_t> &obj);
46 double Length(
size_t start_step=0,
size_t end_step=0)
const;
84 { o <<
"Trajectory with " << a.size() <<
" points " << std::endl;
85 for(
auto const&
p : a )
86 o <<
" " <<
p << std::endl;
void push_back(const T &obj)
push_back template
void compat(const Point_t &obj) const
Dimensionality check function w/ Trajectory.
virtual ~Trajectory()
Default dtor.
Trajectory & operator+=(const Point_t &rhs)
Trajectory(size_t npoints=0, size_t ndimension=0)
Default ctor to specify # points and dimension of each point.
void push_back(const Point_t &obj)
push_back overrie w/ dimensionality check
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
friend std::ostream & operator<<(std::ostream &o, Trajectory const &a)
Streamer.
double Length(size_t start_step=0, size_t end_step=0) const
The summed-length along all trajectory points.
Vector Dir(size_t i=0) const
The direction at a specified trajectory point.
bool IsLonger(double) const
Check if the trajectory is longer than specified value.
Vector _Dir_(size_t i) const
Returns a direction vector at a specified trajectory point w/o size check.