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

Template specialization for parameter grid. More...

#include <JMixingAngle.hh>

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

Public Types

typedef JGrid< double > JGrid_t
 
typedef JMixingAngle< JGrid_tJMixingAngle_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

 JMixingAngle ()
 Default constructor. More...
 
 JMixingAngle (argument_type grid)
 Constructor. More...
 
 JMixingAngle (const int nx, const abscissa_type &xmin, const abscissa_type &xmax)
 Constructor. More...
 
 JMixingAngle (const abscissa_type &value)
 Constructor. More...
 
JMixingAngle_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 JMixingAngle_t make_parameter (const abscissa_type &value)
 Auxiliary function to create a mixing angle parameter grid. More...
 

Protected Attributes

T __value
 
bool is_defined
 

Detailed Description

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

Template specialization for parameter grid.

Definition at line 105 of file JMixingAngle.hh.

Member Typedef Documentation

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

Definition at line 108 of file JMixingAngle.hh.

Definition at line 109 of file JMixingAngle.hh.

Definition at line 110 of file JMixingAngle.hh.

Definition at line 112 of file JMixingAngle.hh.

Definition at line 113 of file JMixingAngle.hh.

Definition at line 115 of file JMixingAngle.hh.

Constructor & Destructor Documentation

JOSCPROB::JMixingAngle< JGrid< double > >::JMixingAngle ( )
inline

Default constructor.

Definition at line 121 of file JMixingAngle.hh.

122  {}
JOSCPROB::JMixingAngle< JGrid< double > >::JMixingAngle ( argument_type  grid)
inlineexplicit

Constructor.

Parameters
gridmixing angle parameter grid [rad]

Definition at line 130 of file JMixingAngle.hh.

130  :
131  JOscParameter_t(grid)
132  {
133  using namespace JPP;
134 
135  if (!is_valid()) {
136  THROW(JValueOutOfRange, "JMixingAngle::JMixingAngle(): Invalid mixing angle parameter grid " << grid);
137  }
138  }
bool is_valid() const override
Check validity of oscillation parameter.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
JOscParameter< JGrid_t > JOscParameter_t
JOSCPROB::JMixingAngle< JGrid< double > >::JMixingAngle ( const int  nx,
const abscissa_type xmin,
const abscissa_type xmax 
)
inline

Constructor.

Parameters
nxnumber of elements
Xminlower limit
Xmaxupper limit

Definition at line 148 of file JMixingAngle.hh.

150  :
152  {}
const double xmax
Definition: JQuadrature.cc:24
const double xmin
Definition: JQuadrature.cc:23
JOscParameter< JGrid_t > JOscParameter_t
JOSCPROB::JMixingAngle< JGrid< double > >::JMixingAngle ( const abscissa_type value)
inlineexplicit

Constructor.

Parameters
valuevalue

Definition at line 160 of file JMixingAngle.hh.

160  :
161  JMixingAngle(1, value, value)
162  {}

Member Function Documentation

JMixingAngle_t& JOSCPROB::JMixingAngle< JGrid< double > >::operator= ( argument_type  grid)
inline

Assignment operator.

Parameters
valuemixing angle parameter grid [rad]
Returns
mixing angle

Definition at line 171 of file JMixingAngle.hh.

172  {
173  this->setValue(grid);
174 
175  return *this;
176  }
void setValue(argument_type value)
Set parameter.
bool JOSCPROB::JMixingAngle< 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 184 of file JMixingAngle.hh.

185  {
186  const abscissa_type minAngle = this->getValue().getXmin();
187  const abscissa_type maxAngle = this->getValue().getXmax();
188 
189  return (this->isDefined() ? !(minAngle < 0.0 || minAngle > M_PI / 2.0 ||
190  maxAngle < 0.0 || maxAngle > M_PI / 2.0) : true);
191  }
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 JMixingAngle_t JOSCPROB::JMixingAngle< JGrid< double > >::make_parameter ( const abscissa_type value)
inlinestatic

Auxiliary function to create a mixing angle parameter grid.

Parameters
valuemixing angle value [rad]
Returns
mixing angle parameter grid

Definition at line 200 of file JMixingAngle.hh.

201  {
202  return JMixingAngle_t(value);
203  }
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: