Jpp  15.0.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 | Protected Attributes | Private Member Functions | Friends | List of all members
JMATH::JLegendre< JQuaternion3D, N > Struct Template Reference

Template specialisation for function evaluation of Legendre polynome of quaternions for defined number of degrees. More...

#include <JEigen3D.hh>

Inheritance diagram for JMATH::JLegendre< JQuaternion3D, N >:
JMATH::JLegendre< JQuaternion3D,(size_t)-1 > JMATH::JLegendre_t< JQuaternion3D > std::vector< JQuaternion3D >

Public Types

typedef std::vector
< JQuaternion3D >
::const_iterator 
const_iterator
 
typedef std::vector
< JQuaternion3D >::iterator 
iterator
 
typedef std::vector
< JQuaternion3D >
::const_reverse_iterator 
const_reverse_iterator
 
typedef std::vector
< JQuaternion3D >
::reverse_iterator 
reverse_iterator
 

Public Member Functions

 JLegendre ()
 Default constructor. More...
 
 JLegendre (const double xmin, const double xmax)
 Constructor. More...
 
template<class T >
 JLegendre (T __begin, T __end)
 Constructor. More...
 
template<class T >
void set (T __begin, T __end)
 Set Legendre polynome of quaternions. More...
 
template<class T >
void set (T __begin, T __not, T __end)
 Set Legendre polynome of quaternions. More...
 
virtual JQuaternion3D getValue (const double x) const override
 Function value. More...
 
JQuaternion3D operator() (const double x) const
 Function value. More...
 
double getXmin () const
 Get minimal abscissa value. More...
 
double getXmax () const
 Get maximal abscissa value. More...
 
double getX (const double x) const
 Get normalised abscissa value. More...
 
void reset ()
 Reset. More...
 
void set (const double xmin, const double xmax)
 Set abscissa values. More...
 

Protected Attributes

double xmin
 minimal abscissa More...
 
double xmax
 maximal abscissa More...
 

Private Member Functions

void clear ()
 
void resize ()
 
void erase ()
 
void push_back ()
 
void pop_back ()
 

Friends

std::istream & operator>> (std::istream &in, JLegendre &object)
 Read Legendre polynome from input. More...
 

Detailed Description

template<size_t N>
struct JMATH::JLegendre< JQuaternion3D, N >

Template specialisation for function evaluation of Legendre polynome of quaternions for defined number of degrees.

Definition at line 257 of file JEigen3D.hh.

Member Typedef Documentation

Definition at line 29 of file JLegendre.hh.

Definition at line 30 of file JLegendre.hh.

Definition at line 31 of file JLegendre.hh.

Definition at line 32 of file JLegendre.hh.

Constructor & Destructor Documentation

template<size_t N>
JMATH::JLegendre< JQuaternion3D, N >::JLegendre ( )
inline

Default constructor.

Definition at line 266 of file JEigen3D.hh.

267  {
269  }
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
template<size_t N>
JMATH::JLegendre< JQuaternion3D, N >::JLegendre ( const double  xmin,
const double  xmax 
)
inline

Constructor.

Parameters
xminminimal abscissa value
xmaxmaximal abscissa value

Definition at line 278 of file JEigen3D.hh.

280  {
282  this->set(xmin, xmax);
283  }
void set(T __begin, T __end)
Set Legendre polynome of quaternions.
Definition: JEigen3D.hh:317
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
double xmax
maximal abscissa
Definition: JLegendre.hh:205
double xmin
minimal abscissa
Definition: JLegendre.hh:204
template<size_t N>
template<class T >
JMATH::JLegendre< JQuaternion3D, N >::JLegendre ( T  __begin,
T  __end 
)
inline

Constructor.

The template argument T refers to an iterator of a data structure which should have the following data members:

  • double first; //
  • JQuaternion3D second; // which conforms with std::pair.
Parameters
__beginbegin of data
__endend of data

Definition at line 298 of file JEigen3D.hh.

299  {
301  this->set(__begin, __end);
302  }
void set(T __begin, T __end)
Set Legendre polynome of quaternions.
Definition: JEigen3D.hh:317
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N

Member Function Documentation

template<size_t N>
template<class T >
void JMATH::JLegendre< JQuaternion3D, N >::set ( T  __begin,
T  __end 
)
inline

Set Legendre polynome of quaternions.

The template argument T refers to an iterator of a data structure which should have the following data members:

  • double first; //
  • JQuaternion3D second; // which conforms with std::pair.
Parameters
__beginbegin of data
__endend of data

Definition at line 317 of file JEigen3D.hh.

318  {
319  this->set(__begin, __end, __end);
320  }
void set(T __begin, T __end)
Set Legendre polynome of quaternions.
Definition: JEigen3D.hh:317
template<size_t N>
template<class T >
void JMATH::JLegendre< JQuaternion3D, N >::set ( T  __begin,
T  __not,
T  __end 
)
inline

Set Legendre polynome of quaternions.

The template argument T refers to an iterator of a data structure which should have the following data members:

  • double first; //
  • JQuaternion3D second; // which conforms with std::pair.
Parameters
__beginbegin of data
__notnot in data
__endend of data

Definition at line 336 of file JEigen3D.hh.

337  {
338  // factor to be applied as power to eigen value obtained with JAverage when degree larger than zero.
339 
340  static const double factor = 1.0 / (PI * 45.0 / 180.0);
341 
342  for (size_t n = 0; n != N + 1; ++n) {
343  (*this)[n] = JQuaternion3D();
344  }
345 
346  this->xmin = std::numeric_limits<double>::max();
347  this->xmax = std::numeric_limits<double>::lowest();
348 
349  for (T i = __begin; i != __end; ++i) {
350  if (i != __not) {
351  if (i->first < this->xmin) { this->xmin = i->first; }
352  if (i->first > this->xmax) { this->xmax = i->first; }
353  }
354  }
355 
356  for (size_t n = 0; n != N + 1; ++n) {
357 
358  JAverage<JQuaternion3D> Q;
359 
360  for (T i = __begin; i != __end; ++i) {
361 
362  if (i != __not) {
363  const double x = i->first;
364  const JQuaternion3D& y = i->second;
365  const double z = this->getX(x);
366  const double w = legendre(n, z);
367  const JQuaternion3D q = this->getValue(x).getConjugate() * y;
368 
369  Q.put(q, w);
370  }
371  }
372 
373  (*this)[n] = Q;
374 
375  if (n != 0) {
376  (*this)[n].pow(factor);
377  }
378  }
379  }
data_type w[N+1][M+1]
Definition: JPolint.hh:741
virtual JQuaternion3D getValue(const double x) const override
Function value.
Definition: JEigen3D.hh:239
Q(UTCMax_s-UTCMin_s)-livetime_s
JQuaternion3D getConjugate() const
Get conjugate of this quaternion.
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
double xmax
maximal abscissa
Definition: JLegendre.hh:205
const int n
Definition: JPolint.hh:660
do set_variable OUTPUT_DIRECTORY $WORKDIR T
static const double PI
Mathematical constants.
double legendre(const unsigned int n, const double x)
Legendre polynome.
Data structure for unit quaternion in three dimensions.
double xmin
minimal abscissa
Definition: JLegendre.hh:204
double getX(const double x) const
Get normalised abscissa value.
Definition: JLegendre.hh:113
template<size_t N>
void JMATH::JLegendre< JQuaternion3D, N >::clear ( )
private
template<size_t N>
void JMATH::JLegendre< JQuaternion3D, N >::resize ( )
private
template<size_t N>
void JMATH::JLegendre< JQuaternion3D, N >::erase ( )
private
template<size_t N>
void JMATH::JLegendre< JQuaternion3D, N >::push_back ( )
private
template<size_t N>
void JMATH::JLegendre< JQuaternion3D, N >::pop_back ( )
private
virtual JQuaternion3D JMATH::JLegendre< JQuaternion3D,(size_t)-1 >::getValue ( const double  x) const
inlineoverridevirtualinherited

Function value.

Parameters
xabscissa value
Returns
function value

Implements JMATH::JLegendre_t< JQuaternion3D >.

Definition at line 239 of file JEigen3D.hh.

240  {
241  const double z = this->getX(x);
242  JQuaternion3D y = zero;
243 
244  for (size_t n = 0; n != this->size(); ++n) {
245  y *= pow((*this)[n], legendre(n,z));
246  }
247 
248  return y.normalise();
249  }
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
const int n
Definition: JPolint.hh:660
T pow(const T &x, const double y)
Power .
Definition: JMath.hh:98
double legendre(const unsigned int n, const double x)
Legendre polynome.
Data structure for unit quaternion in three dimensions.
JQuaternion3D & normalise()
Normalise quaternion.
double getX(const double x) const
Get normalised abscissa value.
Definition: JLegendre.hh:113
JQuaternion3D JMATH::JLegendre_t< JQuaternion3D >::operator() ( const double  x) const
inlineinherited

Function value.

Parameters
xabscissa value
Returns
function value

Definition at line 79 of file JLegendre.hh.

80  {
81  return this->getValue(x);
82  }
virtual JQuaternion3D getValue(const double x) const =0
Function value.
double JMATH::JLegendre_t< JQuaternion3D >::getXmin ( ) const
inlineinherited

Get minimal abscissa value.

Returns
minimal abscissa value

Definition at line 90 of file JLegendre.hh.

91  {
92  return xmin;
93  }
double xmin
minimal abscissa
Definition: JLegendre.hh:204
double JMATH::JLegendre_t< JQuaternion3D >::getXmax ( ) const
inlineinherited

Get maximal abscissa value.

Returns
maximal abscissa value

Definition at line 101 of file JLegendre.hh.

102  {
103  return xmax;
104  }
double xmax
maximal abscissa
Definition: JLegendre.hh:205
double JMATH::JLegendre_t< JQuaternion3D >::getX ( const double  x) const
inlineinherited

Get normalised abscissa value.

Parameters
xabscissa value
Returns
normalised abscissa value

Definition at line 113 of file JLegendre.hh.

114  {
115  return 2.0 * (x - xmin) / (xmax - xmin) - 1.0;
116  }
double xmax
maximal abscissa
Definition: JLegendre.hh:205
double xmin
minimal abscissa
Definition: JLegendre.hh:204
void JMATH::JLegendre_t< JQuaternion3D >::reset ( )
inlineinherited

Reset.

Definition at line 122 of file JLegendre.hh.

123  {
124  for (iterator i = this->begin(); i != this->end(); ++i) {
125  *i = zero;
126  }
127  }
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
std::vector< JQuaternion3D >::iterator iterator
Definition: JLegendre.hh:30
void JMATH::JLegendre_t< JQuaternion3D >::set ( const double  xmin,
const double  xmax 
)
inlineinherited

Set abscissa values.

Parameters
xminminimal abscissa value
xmaxmaximal abscissa value

Definition at line 136 of file JLegendre.hh.

138  {
139  this->xmin = xmin;
140  this->xmax = xmax;
141  }
double xmax
maximal abscissa
Definition: JLegendre.hh:205
double xmin
minimal abscissa
Definition: JLegendre.hh:204

Friends And Related Function Documentation

template<size_t N>
std::istream& operator>> ( std::istream &  in,
JLegendre< JQuaternion3D, N > &  object 
)
friend

Read Legendre polynome from input.

Parameters
ininput stream
objectLegendre polynome
Returns
input stream

Definition at line 389 of file JEigen3D.hh.

390  {
391  for (typename JLegendre::iterator i = object.begin(); i != object.end(); ++i) {
392  in >> *i;
393  }
394 
395  return in;
396  }
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:41

Member Data Documentation

double JMATH::JLegendre_t< JQuaternion3D >::xmin
protectedinherited

minimal abscissa

Definition at line 204 of file JLegendre.hh.

double JMATH::JLegendre_t< JQuaternion3D >::xmax
protectedinherited

maximal abscissa

Definition at line 205 of file JLegendre.hh.


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