yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis 2.0.2
YODA::PointND< 3 > Class Reference

A 3D data point to be contained in a Scatter3D. More...

#include <Point.h>

Inheritance diagram for YODA::PointND< 3 >:
YODA::PointBase< 3 > YODA::XDirectionMixin< PointND< 3 > > YODA::YDirectionMixin< PointND< 3 > > YODA::ZDirectionMixin< PointND< 3 > > YODA::Point

Public Types

using BaseT = PointBase< 3 >
 
- Public Types inherited from YODA::PointBase< 3 >
using NdVal = typename Utils::ndarray< double, N >
 
using NdValPair = typename Utils::ndarray< std::pair< double, double >, N >
 
using DataSize = std::integral_constant< size_t, 3 *N >
 
- Public Types inherited from YODA::Point
using ValuePair = std::pair< double, double >
 

Public Member Functions

Constructors
 PointND (double x, double y, double z, double ex=0.0, double ey=0.0, double ez=0.0)
 Constructor from values with optional symmetric errors.
 
 PointND (double x, double y, double z, double exminus, double explus, double eyminus, double eyplus, double ezminus, double ezplus)
 Constructor from values with explicit asymmetric errors.
 
 PointND (double x, double y, double z, const std::pair< double, double > &ex, const std::pair< double, double > &ey, const std::pair< double, double > &ez)
 Constructor from asymmetric errors given as vectors.
 
 PointND (const BaseT &other)
 Copy constructor.
 
 PointND (BaseT &&other)
 Move constructor.
 
void scaleXYZ (double scalex, double scaley, double scalez)
 Scaling of both axes.
 
- Public Member Functions inherited from YODA::PointBase< 3 >
size_t dim () const
 Space dimension of the point.
 
 PointBase ()
 
 PointBase (ValRange &&val)
 Constructor from position values without errors.
 
 PointBase (ValRange &&val, PairRange &&errs)
 Constructor from values and a set of asymmetric errors.
 
 PointBase (ValRange &&val, ValRange &&errs)
 Constructor from values and a set of symmetric errors.
 
 PointBase (ValRange &&val, ValRange &&errsdn, ValRange &&errsup)
 Constructor from values and a set of asymmetric errors.
 
 PointBase (const PointBase &p)
 
 PointBase (PointBase &&p)
 
void clear ()
 Clear the point values and errors.
 
PointBaseoperator= (const PointBase &p)
 Assignment operator.
 
PointBaseoperator= (PointBase &&p)
 Assignment operator.
 
NdValvals ()
 Get the coordinate vector.
 
const NdValvals () const
 Get the coordinate vector (const version)
 
double val (size_t i) const
 Get the value along direction i.
 
void setVal (const NdVal &val)
 Set the coordinate vector.
 
void setVal (const size_t i, const double val)
 Set a specific coordinate.
 
NdValPairerrs ()
 Get error values.
 
const NdValPairerrs () const
 Get error values (const version)
 
Pair errs (const size_t i) const
 Get error values along axis i.
 
double errMinus (const size_t i) const
 Get the minus error along axis i.
 
double errPlus (const size_t i) const
 Get the plus error along axis i.
 
double errAvg (const size_t i) const
 
double min (const size_t i) const
 Get value minus negative error along axis i.
 
double max (const size_t i) const
 Get value plus positive error along axis i.
 
void setErr (const size_t i, const double e)
 Set a symmetric error pair along axis i.
 
void setErrs (const size_t i, const double eminus, const double eplus)
 Set an asymmetric error pair along axis i.
 
void setErrs (const size_t i, const std::pair< double, double > &e)
 Set a specific error pair along axis i.
 
void setErrMinus (const size_t i, const double eminus)
 Set a specific minus error along axis i.
 
void setErrPlus (const size_t i, const double eplus)
 Set a specific plus error along axis i.
 
void set (const size_t i, const double val, const double e)
 Set value and symmetric error for direction i.
 
void set (const size_t i, const double val, const double eminus, const double eplus)
 Set value and asymmetric error for direction i.
 
void set (const size_t i, const double val, const std::pair< double, double > &e)
 Set value and asymmetric error for direction i.
 
void scaleVal (const size_t i, const double scale)
 Scaling value along direction i.
 
void scaleErr (const size_t i, const double scale)
 Scaling error along direction i.
 
void scale (const size_t i, const double scale)
 Scaling along direction i.
 
void scale (const NdVal &scales)
 Uniform scaling.
 
void scale (const Trf< N > &trf)
 Generalised transformations with functors.
 
void scale (const size_t i, const Trf< N > &trf)
 
void transform (const size_t i, const Trf< N > &trf)
 
- Public Member Functions inherited from YODA::Point
virtual ~Point ()
 Virtual destructor for inheritance.
 
- Public Member Functions inherited from YODA::XDirectionMixin< PointND< 3 > >
double x () const
 Get x value.
 
void setX (double x)
 Set the x value.
 
void setX (double x, double ex)
 Set x value and symmetric error.
 
void setX (double x, double exminus, double explus)
 Set x value and asymmetric error.
 
void setX (double x, std::pair< double, double > &ex)
 Set x value and asymmetric error.
 
std::pair< double, double > xErrs () const
 Get x error pair.
 
double xErrMinus () const
 Get minus x error.
 
double xErrPlus () const
 Get plus x error.
 
double xErrAvg () const
 
void setXErrMinus (double err)
 Set the minus x errors.
 
void setXErrPlus (double err)
 Set the plus x errors.
 
void setXErr (double ex)
 Set symmetric x error.
 
void setXErrs (double ex)
 Set symmetric x error (alias)
 
void setXErrs (double errminus, double errplus)
 Set the x errors.
 
void setXErrs (std::pair< double, double > errs)
 Set the x errors.
 
double xMin () const
 Get value minus negative x-error.
 
double xMax () const
 Get value plus positive x-error.
 
void scaleX (double scalex)
 Scaling of x axis.
 
- Public Member Functions inherited from YODA::YDirectionMixin< PointND< 3 > >
double y () const
 Get y value.
 
void setY (double y)
 Set the y value.
 
std::pair< double, double > xy () const
 
void setXY (double x, double y)
 Set x and y values.
 
void setXY (const std::pair< double, double > &xy)
 Set x and y values.
 
void setY (double y, double ey)
 Set y value and symmetric error.
 
void setY (double y, double eyminus, double eyplus)
 Set y value and asymmetric error.
 
void setY (double y, std::pair< double, double > &ey)
 Set y value and asymmetric error.
 
std::pair< double, double > yErrs () const
 Get y error pair.
 
double yErrMinus () const
 Get minus y error.
 
double yErrPlus () const
 Get plus y error.
 
double yErrAvg () const
 
void setYErrMinus (double err)
 Set the minus y errors.
 
void setYErrPlus (double err)
 Set the plus y errors.
 
void setYErr (double ey)
 Set symmetric y error.
 
void setYErrs (double ey)
 Set symmetric y error (alias)
 
void setYErrs (double errminus, double errplus)
 Set the y errors.
 
void setYErrs (std::pair< double, double > errs)
 Set the y errors.
 
double yMin () const
 Get value minus negative y-error.
 
double yMax () const
 Get value plus positive y-error.
 
void scaleY (double scaley)
 Scaling of y axis.
 
- Public Member Functions inherited from YODA::ZDirectionMixin< PointND< 3 > >
double z () const
 Get z value.
 
void setZ (double z)
 Set the y value.
 
void setXYZ (double x, double y, double z)
 Set x and y values.
 
void setZ (double z, double ez)
 Set z value and symmetric error.
 
void setZ (double z, double ezminus, double ezplus)
 Set y value and asymmetric error.
 
void setZ (double z, std::pair< double, double > &ez)
 Set z value and asymmetric error.
 
std::pair< double, double > zErrs () const
 Get y error pair.
 
double zErrMinus () const
 Get minus z error.
 
double zErrPlus () const
 Get plus z error.
 
double zErrAvg () const
 
void setZErrMinus (double err)
 Set the minus z errors.
 
void setZErrPlus (double err)
 Set the plus y errors.
 
void setZErr (double ez)
 Set symmetric z error.
 
void setZErrs (double ez)
 Set symmetric z error (alias)
 
void setZErrs (double errminus, double errplus)
 Set the z errors.
 
void setZErrs (std::pair< double, double > errs)
 Set the z errors.
 
double zMin () const
 Get value minus negative y-error.
 
double zMax () const
 Get value plus positive y-error.
 
void scaleZ (double scalez)
 Scaling of z axis.
 

Additional Inherited Members

- Protected Types inherited from YODA::PointBase< 3 >
using Pair = std::pair< double, double >
 
using ValList = std::initializer_list< double >
 
using PairList = std::initializer_list< Pair >
 
using containedType = std::decay_t< decltype(*std::declval< Arr >().begin())>
 
using containsPair = typename std::is_same< containedType< Arr >, Pair >
 
using isIterable = std::enable_if_t< Iterable< T >::value >
 
using isIterableWithPair = std::enable_if_t<(Iterable< T >::value &&Iterable< U >::value &&containsPair< U >::value)>
 

Detailed Description

A 3D data point to be contained in a Scatter3D.

Definition at line 659 of file Point.h.

Member Typedef Documentation

◆ BaseT

using YODA::PointND< 3 >::BaseT = PointBase<3>

Definition at line 665 of file Point.h.

Constructor & Destructor Documentation

◆ PointND() [1/5]

YODA::PointND< 3 >::PointND ( double  x,
double  y,
double  z,
double  ex = 0.0,
double  ey = 0.0,
double  ez = 0.0 
)
inline

Constructor from values with optional symmetric errors.

Definition at line 672 of file Point.h.

673 : BaseT({x,y,z}, {{ex,ex}, {ey,ey}, {ez,ez}}) { }
PointBase< 3 > BaseT
Definition Point.h:665
double x() const
Get x value.
Definition PointUtils.h:24
double y() const
Get y value.
Definition PointUtils.h:148
double z() const
Get z value.
Definition PointUtils.h:287

◆ PointND() [2/5]

YODA::PointND< 3 >::PointND ( double  x,
double  y,
double  z,
double  exminus,
double  explus,
double  eyminus,
double  eyplus,
double  ezminus,
double  ezplus 
)
inline

Constructor from values with explicit asymmetric errors.

Definition at line 677 of file Point.h.

681 : BaseT({x,y,z}, {{exminus,explus}, {eyminus,eyplus}, {ezminus,ezplus}}) { }

◆ PointND() [3/5]

YODA::PointND< 3 >::PointND ( double  x,
double  y,
double  z,
const std::pair< double, double > &  ex,
const std::pair< double, double > &  ey,
const std::pair< double, double > &  ez 
)
inline

Constructor from asymmetric errors given as vectors.

Definition at line 684 of file Point.h.

688 : BaseT({x,y,z}, {ex,ey,ez}) { }

◆ PointND() [4/5]

YODA::PointND< 3 >::PointND ( const BaseT other)
inline

Copy constructor.

Definition at line 692 of file Point.h.

692: BaseT(other) { }

◆ PointND() [5/5]

YODA::PointND< 3 >::PointND ( BaseT &&  other)
inline

Move constructor.

Definition at line 695 of file Point.h.

695: BaseT(std::move(other)) { }

Member Function Documentation

◆ scaleXYZ()

void YODA::PointND< 3 >::scaleXYZ ( double  scalex,
double  scaley,
double  scalez 
)
inline

Scaling of both axes.

Definition at line 703 of file Point.h.

703 {
704 scaleX(scalex);
705 scaleY(scaley);
706 scaleZ(scalez);
707 }
void scaleX(double scalex)
Scaling of x axis.
Definition PointUtils.h:129
void scaleY(double scaley)
Scaling of y axis.
Definition PointUtils.h:268
void scaleZ(double scalez)
Scaling of z axis.
Definition PointUtils.h:398

The documentation for this class was generated from the following file: