Jpp  18.4.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
JOSCPROB::JMassSquaredDifference< T > Struct Template Reference

Implementation of mass-squared difference. More...

#include <JMassSquaredDifference.hh>

Inheritance diagram for JOSCPROB::JMassSquaredDifference< T >:
JOSCPROB::JOscParameter< T > JLANG::JParameter< T > JLANG::JComparable< JParameter< T > >

Public Types

typedef JMassSquaredDifference< TJMassSquaredDifference_t
 
typedef JOscParameter< TJOscParameter_t
 
typedef
JOscParameter_t::JParameter_t 
JParameter_t
 
typedef
JOscParameter_t::argument_type 
argument_type
 

Public Member Functions

 JMassSquaredDifference ()
 Default constructor. More...
 
 JMassSquaredDifference (argument_type value)
 Constructor. More...
 
JMassSquaredDifference_toperator= (argument_type value)
 Assignment operator. More...
 
bool is_valid () const override
 Check validity of oscillation parameter. More...
 
void setValue (argument_type value)
 Set parameter. More...
 
const TgetValue () const
 Get value of parameter. More...
 
TgetValue ()
 Get value of parameter. More...
 
 operator const T & () const
 Type conversion operator. More...
 
 operator T & ()
 Type conversion operator. More...
 
const bool isDefined () const
 Get status of parameter. More...
 
bool less (const JParameter< T > &parameter) const
 Less than method. More...
 

Static Public Member Functions

static JMassSquaredDifference_t make_parameter (argument_type value)
 Auxiliary function to create an mass-squared difference parameter grid. More...
 

Protected Attributes

T __value
 
bool is_defined
 

Detailed Description

template<class T = double>
struct JOSCPROB::JMassSquaredDifference< T >

Implementation of mass-squared difference.

Definition at line 27 of file JMassSquaredDifference.hh.

Member Typedef Documentation

Definition at line 30 of file JMassSquaredDifference.hh.

template<class T = double>
typedef JOscParameter<T> JOSCPROB::JMassSquaredDifference< T >::JOscParameter_t

Definition at line 31 of file JMassSquaredDifference.hh.

Definition at line 33 of file JMassSquaredDifference.hh.

Definition at line 34 of file JMassSquaredDifference.hh.

Constructor & Destructor Documentation

template<class T = double>
JOSCPROB::JMassSquaredDifference< T >::JMassSquaredDifference ( )
inline

Default constructor.

Definition at line 40 of file JMassSquaredDifference.hh.

40  :
42  {}
template<class T = double>
JOSCPROB::JMassSquaredDifference< T >::JMassSquaredDifference ( argument_type  value)
inlineexplicit

Constructor.

Parameters
valuemass-squared difference value [eV2]

Definition at line 50 of file JMassSquaredDifference.hh.

50  :
51  JOscParameter_t(value)
52  {
53  using namespace JPP;
54 
55  if (!is_valid()) {
56  THROW(JValueOutOfRange, "JMassSquaredDifference::JMassSquaredDifference(): Invalid mass-squared difference " << value);
57  }
58  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
bool is_valid() const override
Check validity of oscillation parameter.

Member Function Documentation

template<class T = double>
JMassSquaredDifference_t& JOSCPROB::JMassSquaredDifference< T >::operator= ( argument_type  value)
inline

Assignment operator.

Parameters
valuemass-squared difference value [eV2]
Returns
mass-squared difference

Definition at line 67 of file JMassSquaredDifference.hh.

68  {
69  this->setValue(value);
70 
71  return *this;
72  }
void setValue(argument_type value)
Set parameter.
template<class T = double>
bool JOSCPROB::JMassSquaredDifference< T >::is_valid ( ) const
inlineoverridevirtual

Check validity of oscillation parameter.

Returns
true if valid; else false

Implements JOSCPROB::JOscParameter< T >.

Definition at line 80 of file JMassSquaredDifference.hh.

81  {
82  return true;
83  }
template<class T = double>
static JMassSquaredDifference_t JOSCPROB::JMassSquaredDifference< T >::make_parameter ( argument_type  value)
inlinestatic

Auxiliary function to create an mass-squared difference parameter grid.

Parameters
valuemass-squared difference value [eV2]
Returns
mass-squared difference parameter

Definition at line 92 of file JMassSquaredDifference.hh.

93  {
94  return JMassSquaredDifference_t(value);
95  }
JMassSquaredDifference< T > JMassSquaredDifference_t
template<class T = double>
void JOSCPROB::JOscParameter< T >::setValue ( argument_type  value)
inlineinherited

Set parameter.

Parameters
valueoscillation parameter value

Definition at line 73 of file JOscParameter.hh.

74  {
75  using namespace JPP;
76 
78 
79  if (!this->is_valid()) {
80  THROW(JValueOutOfRange, "JOscParameter<T>::setValue(): Given oscillation parameter is invalid " << value);
81  }
82  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
void setValue(argument_type value)
Set value.
Definition: JParameter.hh:103
virtual bool is_valid() const =0
Check validity of oscillation parameter.
template<class T>
const T& JLANG::JParameter< T >::getValue ( ) const
inlineinherited

Get value of parameter.

Returns
value

Definition at line 81 of file JParameter.hh.

82  {
83  return __value;
84  }
template<class T>
T& JLANG::JParameter< T >::getValue ( )
inlineinherited

Get value of parameter.

Returns
value

Definition at line 92 of file JParameter.hh.

93  {
94  return __value;
95  }
template<class T>
JLANG::JParameter< T >::operator const T & ( ) const
inlineinherited

Type conversion operator.

Returns
value

Definition at line 115 of file JParameter.hh.

116  {
117  return getValue();
118  }
const T & getValue() const
Get value of parameter.
Definition: JParameter.hh:81
template<class T>
JLANG::JParameter< T >::operator T & ( )
inlineinherited

Type conversion operator.

Returns
value

Definition at line 126 of file JParameter.hh.

127  {
128  return getValue();
129  }
const T & getValue() const
Get value of parameter.
Definition: JParameter.hh:81
template<class T>
const bool JLANG::JParameter< T >::isDefined ( ) const
inlineinherited

Get status of parameter.

Returns
true if value has been defined (by read or assignment); else false

Definition at line 137 of file JParameter.hh.

138  {
139  return is_defined;
140  }
template<class T>
bool JLANG::JParameter< T >::less ( const JParameter< T > &  parameter) const
inlineinherited

Less than method.

This method evaluates to true if both parameter values are defined and this value is less than the value of the given parameter object.

Parameters
parameterparameter
Returns
true if both defined and first value less than second value; else false

Definition at line 152 of file JParameter.hh.

153  {
154  return this->isDefined() && parameter.isDefined() && this->getValue() < parameter.getValue();
155  }
const bool isDefined() const
Get status of parameter.
Definition: JParameter.hh:137
const T & getValue() const
Get value of parameter.
Definition: JParameter.hh:81

Member Data Documentation

template<class T>
T JLANG::JParameter< T >::__value
protectedinherited

Definition at line 193 of file JParameter.hh.

template<class T>
bool JLANG::JParameter< T >::is_defined
protectedinherited

Definition at line 194 of file JParameter.hh.


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