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 155 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 162 of file Point.h. 162: _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 174 of file Point.h. 175 : _val(std::forward<ValRange>(val)) {
177 throw RangeError("Expected " + std::to_string(N) + " dimensions.");
178 size_t i = 0;
181 for (; it != itEnd; ++it) {
182 _errs[i++] = std::make_pair(*it, *it);
183 }
184 }
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 189 of file Point.h. 190 : _val(std::forward<ValRange>(val)) {
192 throw RangeError("Expected " + std::to_string(N) + " dimensions.");
193 size_t i = 0;
194 auto itdn = std::begin(errsdn);
195 auto itup = std::begin(errsup);
196 const auto& itEnd = std::end(errsdn);
197 for (; itdn != itEnd; ) {
198 _errs[i++] = std::make_pair(*itdn++, *itup++);
199 }
200 }
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 231 of file Point.h. 231 {
232 for (size_t i = 0; i < N; ++i) {
233 _val[i] = 0;
234 _errs[i] = {0.,0.};
235 }
236 }
Referenced by YODA::PointBase< N >::PointBase(). ◆ dim()
template<size_t N>
Space dimension of the point. Implements YODA::Point. Definition at line 209 of file Point.h. 209{ return N; }
◆ errAvg()
template<size_t N>
Definition at line 324 of file Point.h. 324 {
326 }
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 312 of file Point.h. 312 {
313 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
314 return _errs[i].first;
315 }
Referenced by YODA::PointBase< N >::errAvg(). ◆ errPlus()
template<size_t N>
Get the plus error along axis i. Definition at line 318 of file Point.h. 318 {
319 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
320 return _errs[i].second;
321 }
Referenced by YODA::PointBase< N >::errAvg(). ◆ errs() [1/3]
template<size_t N>
Get error values. Definition at line 296 of file Point.h. 296 {
297 return _errs;
298 }
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 421 of file Point.h. 421 {
422 for (size_t i = 0; i < N; ++i) {
423 scale(i, scales[i]);
424 }
425 }
References YODA::PointBase< N >::scale(). ◆ scale() [2/4]
template<size_t N>
Scaling along direction i. Implements YODA::Point. Definition at line 415 of file Point.h. 415 {
418 }
void scaleErr(const size_t i, const double scale) Scaling error along direction i. Definition Point.h:408 void scaleVal(const size_t i, const double scale) Scaling value along direction i. Definition Point.h:402 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 434 of file Point.h. 434 {
435 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
436 trf.transform(_val[i], _errs[i]);
437 }
References YODA::Transformation< N, Args >::transform(). ◆ scale() [4/4]
template<size_t N>
Generalised transformations with functors. Definition at line 428 of file Point.h. 428 {
429 trf.transform(_val, _errs);
430 }
References YODA::Transformation< N, Args >::transform(). ◆ scaleErr()
template<size_t N>
Scaling error along direction i. Definition at line 408 of file Point.h. 408 {
409 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
410 _errs[i].first *= scale;
411 _errs[i].second *= scale;
412 }
References YODA::PointBase< N >::scale(). Referenced by YODA::PointBase< N >::scale(). ◆ scaleVal()
template<size_t N>
Scaling value along direction i. Definition at line 402 of file Point.h. 402 {
403 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
404 _val[i] *= scale;
405 }
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 376 of file Point.h. 376 {
377 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
378 const double err = fabs(e);
379 _val[i] = val;
380 _errs[i] = {err,err};
381 }
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 383 of file Point.h. 383 {
384 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
385 _val[i] = val;
386 _errs[i].first = eminus;
387 _errs[i].second = eplus;
388 }
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 390 of file Point.h. 390 {
391 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
392 _val[i] = val;
393 _errs[i] = e;
394 }
References YODA::PointBase< N >::val(). ◆ setErr()
template<size_t N>
Set a symmetric error pair along axis i. Implements YODA::Point. Definition at line 341 of file Point.h. 341 {
342 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
343 const double err = fabs(e);
344 _errs[i] = { err, err};
345 }
◆ setErrMinus()
template<size_t N>
Set a specific minus error along axis i. Implements YODA::Point. Definition at line 360 of file Point.h. 360 {
361 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
362 _errs[i].first = eminus;
363 }
◆ setErrPlus()
template<size_t N>
Set a specific plus error along axis i. Implements YODA::Point. Definition at line 366 of file Point.h. 366 {
367 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
368 _errs[i].second = eplus;
369 }
◆ setErrs() [1/2]
template<size_t N>
Set an asymmetric error pair along axis i. Implements YODA::Point. Definition at line 348 of file Point.h. 348 {
349 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
350 _errs[i] = { eminus, eplus};
351 }
◆ setErrs() [2/2]
template<size_t N>
Set a specific error pair along axis i. Implements YODA::Point. Definition at line 354 of file Point.h. 354 {
355 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
356 _errs[i] = e;
357 }
◆ setVal() [1/2]
template<size_t N>
Set the coordinate vector. Definition at line 279 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 284 of file Point.h. 284 {
285 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
286 _val[i] = val;
287 }
References YODA::PointBase< N >::val(). ◆ transform()
template<size_t N>
Definition at line 439 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 273 of file Point.h. 273 {
274 if (i >= N) throw RangeError("Invalid axis int, must be in range 0..dim-1");
275 return _val[i];
276 }
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 267 of file Point.h. 267{ 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 Fri Mar 7 2025 09:06:40 for YODA - Yet more Objects for Data Analysis by |