14 this->reserve(obj.size());
20 this->reserve(obj.size());
26 if(end_step == 0) end_step =
size() - 1;
29 if(start_step >= end_step)
throw GeoAlgoException(
"Cannot have start step >= end step!");
34 if(
size()<2)
return 0;
37 for(
size_t i=start_step; i<end_step; ++i)
39 length += (*
this)[i]._Dist_((*
this)[i+1]);
46 if(
size()<2)
return false;
49 for(
size_t i=0; i<
size()-1; ++i) {
51 length += (*this)[i]._Dist_((*
this)[i+1]);
53 if(length > ref)
return true;
61 if (!(
size() && obj == (*rbegin())))
68 if( (*(this->
begin())).
size() != obj.size() ) {
70 std::ostringstream
msg;
71 msg <<
"<<" << __FUNCTION__ <<
">>" 80 if(!
size() || !(obj.size()))
return;
84 std::ostringstream
msg;
85 msg <<
"<<" << __FUNCTION__ <<
">>" 96 std::ostringstream
msg;
97 msg <<
"<<" << __FUNCTION__ <<
">>" 98 <<
" length=" <<
size() <<
" is too short to find a direction @ index=" << i <<
std::endl;
106 return ((*
this)[i+1] - (*
this)[i]);
void msg(const char *fmt,...)
void compat(const Point_t &obj) const
Dimensionality check function w/ Trajectory.
Class def header for a class GeoAlgoException.
Trajectory(size_t npoints=0, size_t ndimension=0)
Default ctor to specify # points and dimension of each point.
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
void push_back(const Point_t &obj)
push_back overrie w/ dimensionality check
fInnerVessel push_back(Point(-578.400000, 0.000000, 0.000000))
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.
Class def header for a class Trajectory.
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Vector _Dir_(size_t i) const
Returns a direction vector at a specified trajectory point w/o size check.
QTextStream & endl(QTextStream &s)