JHUGen MELA  JHUGen v7.5.6, MELA v2.4.2
Matrix element calculations as used in JHUGen.
TNumericUtil::quadruplet< T > Struct Template Reference

#include <TNumericUtil.hh>

Public Member Functions

 quadruplet (T i1, T i2, T i3, T i4)
 
 quadruplet (T i1)
 
 quadruplet ()
 
T & operator[] (std::size_t ipos)
 
const T & operator[] (std::size_t ipos) const
 
bool operator== (const quadruplet< T > &other) const
 
bool operator!= (const quadruplet< T > &other) const
 

Public Attributes

value [4]
 

Detailed Description

template<typename T>
struct TNumericUtil::quadruplet< T >

Definition at line 27 of file TNumericUtil.hh.

Constructor & Destructor Documentation

◆ quadruplet() [1/3]

template<typename T >
TNumericUtil::quadruplet< T >::quadruplet ( i1,
i2,
i3,
i4 
)
inline

Definition at line 29 of file TNumericUtil.hh.

29  {
30  value[0]=i1;
31  value[1]=i2;
32  value[2]=i3;
33  value[3]=i4;
34  }

◆ quadruplet() [2/3]

template<typename T >
TNumericUtil::quadruplet< T >::quadruplet ( i1)
inline

Definition at line 35 of file TNumericUtil.hh.

35 { for (unsigned int idim=0; idim<4; idim++) value[idim] = i1; }

◆ quadruplet() [3/3]

template<typename T >
TNumericUtil::quadruplet< T >::quadruplet ( )
inline

Definition at line 36 of file TNumericUtil.hh.

36 {}

Member Function Documentation

◆ operator!=()

template<typename T >
bool TNumericUtil::quadruplet< T >::operator!= ( const quadruplet< T > &  other) const
inline

Definition at line 40 of file TNumericUtil.hh.

40 { return !(*this==other); }

◆ operator==()

template<typename T >
bool TNumericUtil::quadruplet< T >::operator== ( const quadruplet< T > &  other) const
inline

Definition at line 39 of file TNumericUtil.hh.

39 { bool res = true; for (std::size_t i=0; i<4; i++) res &= (*this)[i]==other[i]; return res; }

◆ operator[]() [1/2]

template<typename T >
T& TNumericUtil::quadruplet< T >::operator[] ( std::size_t  ipos)
inline

Definition at line 37 of file TNumericUtil.hh.

37 { return value[ipos]; } // Return by reference

◆ operator[]() [2/2]

template<typename T >
const T& TNumericUtil::quadruplet< T >::operator[] ( std::size_t  ipos) const
inline

Definition at line 38 of file TNumericUtil.hh.

38 { return value[ipos]; } // Return by const reference

Member Data Documentation

◆ value

template<typename T >
T TNumericUtil::quadruplet< T >::value[4]

Definition at line 28 of file TNumericUtil.hh.


The documentation for this struct was generated from the following file:
TNumericUtil::quadruplet::value
T value[4]
Definition: TNumericUtil.hh:28