YODA::PointBase< N > Class Template Reference The base for an N-dimensional data point to be contained in a Scatter<N> More...
Inheritance diagram for YODA::PointBase< N >:
Detailed Descriptiontemplate<size_t N> class YODA::PointBase< N > The base for an N-dimensional data point to be contained in a Scatter<N> Member Typedef Documentation◆ containedType
template<size_t N>
template<typename Arr >
◆ containsPair
template<size_t N>
template<typename Arr >
◆ DataSize
template<size_t N>
◆ isIterable
template<size_t N>
template<typename T >
◆ isIterableWithPair
template<size_t N>
template<typename T , typename U >
◆ NdVal
template<size_t N>
◆ NdValPair
template<size_t N>
◆ Pair
template<size_t N>
◆ PairList
template<size_t N>
◆ ValList
template<size_t N>
Constructor & Destructor Documentation◆ PointBase() [1/7]
template<size_t N>
Definition at line 156 of file Point.h. References YODA::PointBase< N >::clear(). ◆ PointBase() [2/7]
template<size_t N>
template<typename ValRange = ValList, typename = isIterable<ValRange>>
Constructor from position values without errors. Definition at line 163 of file Point.h. 163: _val(std::forward<ValRange>(val)) { }
◆ PointBase() [3/7]
template<size_t N>
template<typename ValRange = ValList, typename PairRange = PairList, typename = isIterableWithPair<ValRange,PairRange>>
◆ PointBase() [4/7]
template<size_t N>
template<typename ValRange = ValList, typename = isIterable<ValRange>>
Constructor from values and a set of symmetric errors. Definition at line 175 of file Point.h. 176 : _val(std::forward<ValRange>(val)) {
178 throw RangeError("Expected " + std::to_string(N) + " dimensions.");
179 size_t i = 0;
182 for (; it != itEnd; ++it) {
183 _errs[i++] = std::make_pair(*it, *it);
184 }
185 }
References YODA::PointBase< N >::errs(), and YODA::PointBase< N >::val(). ◆ PointBase() [5/7]
template<size_t N>
template<typename ValRange = ValList, typename = isIterable<ValRange>>
Constructor from values and a set of asymmetric errors. Definition at line 190 of file Point.h. 191 : _val(std::forward<ValRange>(val)) {
193 throw RangeError("Expected " + std::to_string(N) + " dimensions.");
194 size_t i = 0;
195 auto itdn = std::begin(errsdn);
196 auto itup = std::begin(errsup);
197 const auto& itEnd = std::end(errsdn);
198 for (; itdn != itEnd; ) {
199 _errs[i++] = std::make_pair(*itdn++, *itup++);
200 }
201 }
References YODA::PointBase< N >::val(). ◆ PointBase() [6/7]
template<size_t N>
◆ PointBase() [7/7]
template<size_t N>
Member Function Documentation◆ clear()
template<size_t N>
Clear the point values and errors. Definition at line 232 of file Point.h. 232 {
233 for (size_t i = 0; i < N; ++i) {
234 _val[i] = 0;
235 _errs[i] = {0.,0.};
236 }
237 }
Referenced by YODA::PointBase< N >::PointBase(). ◆ dim()
template<size_t N>
Space dimension of the point. Implements YODA::Point. Definition at line 210 of file Point.h. 210{ return N; }
◆ errAvg()
template<size_t N>
Definition at line 325 of file Point.h. 325 {
327 }
References YODA::PointBase< N >::errMinus(), and YODA::PointBase< N >::errPlus(). ◆ errMinus()
template<size_t N>
Get the minus error along axis i. Definition at line 313 of file Point.h. 313 {
314 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
315 return _errs[i].first;
316 }
Referenced by YODA::PointBase< N >::errAvg(). ◆ errPlus()
template<size_t N>
Get the plus error along axis i. Definition at line 319 of file Point.h. 319 {
320 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
321 return _errs[i].second;
322 }
Referenced by YODA::PointBase< N >::errAvg(). ◆ errs() [1/3]
template<size_t N>
Get error values. Definition at line 297 of file Point.h. 297 {
298 return _errs;
299 }
Referenced by YODA::operator<(), YODA::operator==(), and YODA::PointBase< N >::PointBase(). ◆ errs() [2/3]
template<size_t N>
◆ errs() [3/3]
template<size_t N>
◆ max()
template<size_t N>
◆ min()
template<size_t N>
◆ operator=() [1/2]
template<size_t N>
◆ operator=() [2/2]
template<size_t N>
◆ scale() [1/4]
template<size_t N>
Uniform scaling. Definition at line 422 of file Point.h. 422 {
423 for (size_t i = 0; i < N; ++i) {
424 scale(i, scales[i]);
425 }
426 }
References YODA::PointBase< N >::scale(). ◆ scale() [2/4]
template<size_t N>
Scaling along direction i. Implements YODA::Point. Definition at line 416 of file Point.h. 416 {
419 }
void scaleErr(const size_t i, const double scale) Scaling error along direction i. Definition Point.h:409 void scaleVal(const size_t i, const double scale) Scaling value along direction i. Definition Point.h:403 References YODA::PointBase< N >::scale(), YODA::PointBase< N >::scaleErr(), and YODA::PointBase< N >::scaleVal(). Referenced by YODA::PointBase< N >::scale(), YODA::PointBase< N >::scale(), YODA::PointBase< N >::scaleErr(), YODA::PointBase< N >::scaleVal(), and YODA::PointBase< N >::transform(). ◆ scale() [3/4]
template<size_t N>
Generalised transformations with functors along axis i Definition at line 435 of file Point.h. 435 {
436 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
437 trf.transform(_val[i], _errs[i]);
438 }
References YODA::Transformation< N, Args >::transform(). ◆ scale() [4/4]
template<size_t N>
Generalised transformations with functors. Definition at line 429 of file Point.h. 429 {
430 trf.transform(_val, _errs);
431 }
References YODA::Transformation< N, Args >::transform(). ◆ scaleErr()
template<size_t N>
Scaling error along direction i. Definition at line 409 of file Point.h. 409 {
410 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
411 _errs[i].first *= scale;
412 _errs[i].second *= scale;
413 }
References YODA::PointBase< N >::scale(). Referenced by YODA::PointBase< N >::scale(). ◆ scaleVal()
template<size_t N>
Scaling value along direction i. Definition at line 403 of file Point.h. 403 {
404 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
405 _val[i] *= scale;
406 }
References YODA::PointBase< N >::scale(). Referenced by YODA::PointBase< N >::scale(). ◆ set() [1/3]
template<size_t N>
Set value and symmetric error for direction i. Implements YODA::Point. Definition at line 377 of file Point.h. 377 {
378 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
379 const double err = fabs(e);
380 _val[i] = val;
381 _errs[i] = {err,err};
382 }
References YODA::PointBase< N >::val(). ◆ set() [2/3]
template<size_t N>
Set value and asymmetric error for direction i. Implements YODA::Point. Definition at line 384 of file Point.h. 384 {
385 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
386 _val[i] = val;
387 _errs[i].first = eminus;
388 _errs[i].second = eplus;
389 }
References YODA::PointBase< N >::val(). ◆ set() [3/3]
template<size_t N>
Set value and asymmetric error for direction i. Implements YODA::Point. Definition at line 391 of file Point.h. 391 {
392 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
393 _val[i] = val;
394 _errs[i] = e;
395 }
References YODA::PointBase< N >::val(). ◆ setErr()
template<size_t N>
Set a symmetric error pair along axis i. Implements YODA::Point. Definition at line 342 of file Point.h. 342 {
343 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
344 const double err = fabs(e);
345 _errs[i] = { err, err};
346 }
◆ setErrMinus()
template<size_t N>
Set a specific minus error along axis i. Implements YODA::Point. Definition at line 361 of file Point.h. 361 {
362 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
363 _errs[i].first = eminus;
364 }
◆ setErrPlus()
template<size_t N>
Set a specific plus error along axis i. Implements YODA::Point. Definition at line 367 of file Point.h. 367 {
368 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
369 _errs[i].second = eplus;
370 }
◆ setErrs() [1/2]
template<size_t N>
Set an asymmetric error pair along axis i. Implements YODA::Point. Definition at line 349 of file Point.h. 349 {
350 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
351 _errs[i] = { eminus, eplus};
352 }
◆ setErrs() [2/2]
template<size_t N>
Set a specific error pair along axis i. Implements YODA::Point. Definition at line 355 of file Point.h. 355 {
356 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
357 _errs[i] = e;
358 }
◆ setVal() [1/2]
template<size_t N>
Set the coordinate vector. Definition at line 280 of file Point.h. References YODA::PointBase< N >::val(). ◆ setVal() [2/2]
template<size_t N>
Set a specific coordinate. Implements YODA::Point. Definition at line 285 of file Point.h. 285 {
286 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
287 _val[i] = val;
288 }
References YODA::PointBase< N >::val(). ◆ transform()
template<size_t N>
Definition at line 440 of file Point.h. References YODA::PointBase< N >::scale(). ◆ val()
template<size_t N>
Get the value along direction i. Implements YODA::Point. Reimplemented in YODA::PointND< 1 >. Definition at line 274 of file Point.h. 274 {
275 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
276 return _val[i];
277 }
Referenced by YODA::PointBase< N >::PointBase(), YODA::PointBase< N >::PointBase(), YODA::PointBase< N >::set(), YODA::PointBase< N >::set(), YODA::PointBase< N >::set(), YODA::PointBase< N >::setVal(), and YODA::PointBase< N >::setVal(). ◆ vals() [1/2]
template<size_t N>
Get the coordinate vector. Definition at line 268 of file Point.h. 268{ return _val; }
Referenced by YODA::operator<(), and YODA::operator==(). ◆ vals() [2/2]
template<size_t N>
The documentation for this class was generated from the following file:
Generated on Mon Oct 28 2024 13:47:24 for YODA - Yet more Objects for Data Analysis by 1.9.8 |