Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Static Public Member Functions | Friends | List of all members
mygsl::datapoint Class Reference

A serializable (x,y,sigma(y)) triplet. More...

#include <bayeux/mygsl/datapoint.h>

Inheritance diagram for mygsl::datapoint:
datatools::i_serializable

Public Member Functions

 datapoint ()
 Default constructor. More...
 
 datapoint (double x_, double y_, double sigma_y_=std::numeric_limits< double >::quiet_NaN())
 Constructor with a (x, y, sigma_y) triplet. More...
 
virtual ~datapoint ()
 Destructor. More...
 
const double & x () const
 Return the X coordinate. More...
 
const double & y () const
 Return the Y coordinate. More...
 
const double & sigma_y () const
 Return the error on the Y coordinate. More...
 
bool has_sigma_y () const
 Check if the error on the Y coordinate is provided. More...
 
bool is_weighted () const
 Check if the datapoints in weighted with the error on the Y coordinate. More...
 
- Public Member Functions inherited from datatools::i_serializable
 i_serializable ()
 Default constructor. More...
 
virtual ~i_serializable ()
 Destructor. More...
 
virtual const std::string & get_serial_tag () const =0
 Return the serialization string identifier of the class. More...
 

Static Public Member Functions

static bool comp_by_x (const datapoint &p1_, const datapoint &p2_)
 Compare two datapoint using their X coordinate. More...
 

Friends

std::ostream & operator<< (std::ostream &, const datapoint &)
 
std::istream & operator>> (std::istream &, datapoint &)
 

Detailed Description

A serializable (x,y,sigma(y)) triplet.

Constructor & Destructor Documentation

◆ datapoint() [1/2]

mygsl::datapoint::datapoint ( )

Default constructor.

◆ datapoint() [2/2]

mygsl::datapoint::datapoint ( double  x_,
double  y_,
double  sigma_y_ = std::numeric_limits< double >::quiet_NaN() 
)

Constructor with a (x, y, sigma_y) triplet.

◆ ~datapoint()

virtual mygsl::datapoint::~datapoint ( )
virtual

Destructor.

Member Function Documentation

◆ comp_by_x()

static bool mygsl::datapoint::comp_by_x ( const datapoint p1_,
const datapoint p2_ 
)
static

Compare two datapoint using their X coordinate.

◆ has_sigma_y()

bool mygsl::datapoint::has_sigma_y ( ) const

Check if the error on the Y coordinate is provided.

◆ is_weighted()

bool mygsl::datapoint::is_weighted ( ) const

Check if the datapoints in weighted with the error on the Y coordinate.

◆ sigma_y()

const double& mygsl::datapoint::sigma_y ( ) const

Return the error on the Y coordinate.

◆ x()

const double& mygsl::datapoint::x ( ) const

Return the X coordinate.

◆ y()

const double& mygsl::datapoint::y ( ) const

Return the Y coordinate.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  ,
const datapoint  
)
friend

◆ operator>>

std::istream& operator>> ( std::istream &  ,
datapoint  
)
friend

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