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< JGrid< double > > Struct Template Reference

Template specialization for parameter grid. More...

#include <JMassSquaredDifference.hh>

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

Public Types

typedef JGrid< double > JGrid_t
 
typedef JMassSquaredDifference
< JGrid_t
JMassSquaredDifference_t
 
typedef JOscParameter< JGrid_tJOscParameter_t
 
typedef
JOscParameter_t::JParameter_t 
JParameter_t
 
typedef
JOscParameter_t::argument_type 
argument_type
 
typedef JGrid_t::abscissa_type abscissa_type
 

Public Member Functions

 JMassSquaredDifference ()
 Default constructor. More...
 
 JMassSquaredDifference (argument_type grid)
 Constructor. More...
 
 JMassSquaredDifference (const int nx, const abscissa_type &xmin, const abscissa_type &xmax)
 Constructor. More...
 
 JMassSquaredDifference (const abscissa_type &value)
 Constructor. More...
 
JMassSquaredDifference_toperator= (argument_type grid)
 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 (const abscissa_type &value)
 Auxiliary function to create an mass-squared difference parameter grid. More...
 

Protected Attributes

T __value
 
bool is_defined
 

Detailed Description

template<>
struct JOSCPROB::JMassSquaredDifference< JGrid< double > >

Template specialization for parameter grid.

Definition at line 103 of file JMassSquaredDifference.hh.

Member Typedef Documentation

typedef JGrid<double> JOSCPROB::JMassSquaredDifference< JGrid< double > >::JGrid_t

Definition at line 106 of file JMassSquaredDifference.hh.

Definition at line 107 of file JMassSquaredDifference.hh.

Definition at line 108 of file JMassSquaredDifference.hh.

Definition at line 110 of file JMassSquaredDifference.hh.

Definition at line 111 of file JMassSquaredDifference.hh.

Definition at line 113 of file JMassSquaredDifference.hh.

Constructor & Destructor Documentation

Default constructor.

Definition at line 119 of file JMassSquaredDifference.hh.

120  {}

Constructor.

Parameters
gridmass-squared difference parameter grid [eV2]

Definition at line 128 of file JMassSquaredDifference.hh.

128  :
129  JOscParameter(grid)
130  {
131  using namespace JPP;
132 
133  if (!is_valid()) {
134  THROW(JValueOutOfRange, "JMassSquaredDifference::JMassSquaredDifference(): Invalid mass-squared difference grid " << grid);
135  }
136  }
#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.
JOSCPROB::JMassSquaredDifference< JGrid< double > >::JMassSquaredDifference ( const int  nx,
const abscissa_type xmin,
const abscissa_type xmax 
)
inline

Constructor.

Parameters
nxnumber of elements
Xminlower limit [eV2]
Xmaxupper limit [eV2]

Definition at line 146 of file JMassSquaredDifference.hh.

148  :
150  {}
const double xmax
Definition: JQuadrature.cc:24
const double xmin
Definition: JQuadrature.cc:23
JOSCPROB::JMassSquaredDifference< JGrid< double > >::JMassSquaredDifference ( const abscissa_type value)
inlineexplicit

Constructor.

Parameters
valuevalue

Definition at line 158 of file JMassSquaredDifference.hh.

158  :
159  JMassSquaredDifference(1, value, value)
160  {}

Member Function Documentation

Assignment operator.

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

Definition at line 169 of file JMassSquaredDifference.hh.

170  {
171  this->setValue(grid);
172 
173  return *this;
174  }
void setValue(argument_type value)
Set parameter.
bool JOSCPROB::JMassSquaredDifference< JGrid< double > >::is_valid ( ) const
inlineoverridevirtual

Check validity of oscillation parameter.

Returns
true if valid; else false

Implements JOSCPROB::JOscParameter< JGrid< double > >.

Definition at line 182 of file JMassSquaredDifference.hh.

183  {
184  const abscissa_type mindM2 = this->getValue().getXmin();
185  const abscissa_type maxdM2 = this->getValue().getXmax();
186 
187  return this->isDefined() ? !(mindM2 < 0.0 || maxdM2 < 0.0) : true;
188  }
const bool isDefined() const
Get status of parameter.
Definition: JParameter.hh:137
const T & getValue() const
Get value of parameter.
Definition: JParameter.hh:81
static JMassSquaredDifference_t JOSCPROB::JMassSquaredDifference< JGrid< double > >::make_parameter ( const abscissa_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 197 of file JMassSquaredDifference.hh.

198  {
199  return JMassSquaredDifference_t(value);
200  }
void JOSCPROB::JOscParameter< JGrid< double > >::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 
77  JParameter_t::setValue(value);
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
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: