Jpp  18.6.0-rc.1
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 JParameter_t::argument_type argument_type
 
typedef JParameter_t::value_type value_type
 

Public Member Functions

 JMassSquaredDifference ()
 Default constructor. More...
 
 JMassSquaredDifference (const JGrid_t &grid)
 Constructor. More...
 
 JMassSquaredDifference (const int nx, const double xmin, const double xmax)
 Constructor. More...
 
 JMassSquaredDifference (const double value)
 Constructor. More...
 
JMassSquaredDifference_toperator= (const JGrid_t &grid)
 Assignment operator. More...
 
bool is_valid () const override
 Check validity of oscillation parameter. More...
 
void setValue (const value_type &value)
 Set parameter. More...
 
const value_type getValue () const
 Get value of parameter. More...
 
 operator const value_type () const
 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 double 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 104 of file JMassSquaredDifference.hh.

Member Typedef Documentation

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

Definition at line 107 of file JMassSquaredDifference.hh.

Definition at line 108 of file JMassSquaredDifference.hh.

Definition at line 109 of file JMassSquaredDifference.hh.

Definition at line 111 of file JMassSquaredDifference.hh.

Definition at line 33 of file JOscParameter.hh.

Definition at line 34 of file JOscParameter.hh.

Constructor & Destructor Documentation

Default constructor.

Definition at line 117 of file JMassSquaredDifference.hh.

118  {}
JOSCPROB::JMassSquaredDifference< JGrid< double > >::JMassSquaredDifference ( const JGrid_t grid)
inlineexplicit

Constructor.

Parameters
gridmass-squared difference parameter grid [eV2]

Definition at line 126 of file JMassSquaredDifference.hh.

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

Constructor.

Parameters
nxnumber of elements
xminlower limit [eV2]
xmaxupper limit [eV2]

Definition at line 144 of file JMassSquaredDifference.hh.

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

Constructor.

Parameters
valuevalue

Definition at line 156 of file JMassSquaredDifference.hh.

156  :
157  JMassSquaredDifference(1, value, value)
158  {}

Member Function Documentation

JMassSquaredDifference_t& JOSCPROB::JMassSquaredDifference< JGrid< double > >::operator= ( const JGrid_t grid)
inline

Assignment operator.

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

Definition at line 167 of file JMassSquaredDifference.hh.

168  {
169  this->setValue(grid);
170 
171  return *this;
172  }
void setValue(const value_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 180 of file JMassSquaredDifference.hh.

181  {
182  return true;
183  }
static JMassSquaredDifference_t JOSCPROB::JMassSquaredDifference< JGrid< double > >::make_parameter ( const double  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 192 of file JMassSquaredDifference.hh.

193  {
194  return JMassSquaredDifference_t(value);
195  }
void JOSCPROB::JOscParameter< JGrid< double > >::setValue ( const value_type value)
inlineinherited

Set parameter.

Parameters
valueoscillation parameter value

Definition at line 74 of file JOscParameter.hh.

75  {
76  using namespace JPP;
77 
78  JParameter_t::setValue(value);
79 
80  if (!this->is_valid()) {
81  THROW(JValueOutOfRange, "JOscParameter<T>::setValue(): Given oscillation parameter is invalid " << value);
82  }
83  }
#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 value_type JLANG::JParameter< T >::getValue ( ) const
inlineinherited

Get value of parameter.

Returns
value

Definition at line 82 of file JParameter.hh.

83  {
84  return __value;
85  }
template<class T>
JLANG::JParameter< T >::operator const value_type ( ) const
inlineinherited

Type conversion operator.

Returns
value

Definition at line 105 of file JParameter.hh.

106  {
107  return getValue();
108  }
const value_type getValue() const
Get value of parameter.
Definition: JParameter.hh:82
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 116 of file JParameter.hh.

117  {
118  return is_defined;
119  }
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 131 of file JParameter.hh.

132  {
133  return this->isDefined() && parameter.isDefined() && this->getValue() < parameter.getValue();
134  }
const bool isDefined() const
Get status of parameter.
Definition: JParameter.hh:116
const value_type getValue() const
Get value of parameter.
Definition: JParameter.hh:82

Member Data Documentation

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

Definition at line 172 of file JParameter.hh.

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

Definition at line 173 of file JParameter.hh.


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