Public Member Functions | Public Attributes | Protected Member Functions | Static Private Member Functions | List of all members
genie::TabulatedLabFrameHadronTensor::TableEntry Class Reference

#include <TabulatedLabFrameHadronTensor.h>

Public Member Functions

TableEntry operator* (double d) const
 
TableEntry operator/ (double d) const
 
TableEntry operator+ (const TableEntry &rhs) const
 
TableEntry operator- (const TableEntry &rhs) const
 
TableEntry operator* (const TableEntry &rhs) const
 
TableEntry operator/ (const TableEntry &rhs) const
 
bool operator== (const TableEntry &rhs) const
 
bool operator!= (const TableEntry &rhs) const
 

Public Attributes

double W00
 
double Wxx
 
double Wzz
 
double ImWxy
 
double ReW0z
 

Protected Member Functions

TableEntry apply_to_elements (double d, double(*my_function)(double, double)) const
 
TableEntry apply_to_elements (const TableEntry &rhs, double(*my_function)(double, double)) const
 

Static Private Member Functions

static double add (double x, double y)
 
static double subtract (double x, double y)
 
static double multiply (double x, double y)
 
static double divide (double x, double y)
 

Detailed Description

Definition at line 93 of file TabulatedLabFrameHadronTensor.h.

Member Function Documentation

static double genie::TabulatedLabFrameHadronTensor::TableEntry::add ( double  x,
double  y 
)
inlinestaticprivate
Todo:
Replace these with lambdas (or something similar) when GENIE updates to C++11. This technique is a bit of a hack.

Definition at line 173 of file TabulatedLabFrameHadronTensor.h.

173 { return x + y; }
list x
Definition: train.py:276
TableEntry genie::TabulatedLabFrameHadronTensor::TableEntry::apply_to_elements ( double  d,
double(*)(double, double)  my_function 
) const
inlineprotected

Definition at line 138 of file TabulatedLabFrameHadronTensor.h.

140  {
141  // Create a new TableEntry object by applying the function to
142  // each pair of elements
143  TableEntry result;
144  result.W00 = (*my_function)( this->W00, d );
145  result.Wxx = (*my_function)( this->Wxx, d );
146  result.Wzz = (*my_function)( this->Wzz, d );
147  result.ImWxy = (*my_function)( this->ImWxy, d );
148  result.ReW0z = (*my_function)( this->ReW0z, d );
149 
150  return result;
151  }
static QCString result
TableEntry genie::TabulatedLabFrameHadronTensor::TableEntry::apply_to_elements ( const TableEntry rhs,
double(*)(double, double)  my_function 
) const
inlineprotected

Definition at line 153 of file TabulatedLabFrameHadronTensor.h.

155  {
156  // Create a new TableEntry object by applying the function to
157  // each pair of elements
158  TableEntry result;
159  result.W00 = (*my_function)( this->W00, rhs.W00 );
160  result.Wxx = (*my_function)( this->Wxx, rhs.Wxx );
161  result.Wzz = (*my_function)( this->Wzz, rhs.Wzz );
162  result.ImWxy = (*my_function)( this->ImWxy, rhs.ImWxy );
163  result.ReW0z = (*my_function)( this->ReW0z, rhs.ReW0z );
164  return result;
165  }
static QCString result
static double genie::TabulatedLabFrameHadronTensor::TableEntry::divide ( double  x,
double  y 
)
inlinestaticprivate

Definition at line 176 of file TabulatedLabFrameHadronTensor.h.

176 { return x / y; }
list x
Definition: train.py:276
static double genie::TabulatedLabFrameHadronTensor::TableEntry::multiply ( double  x,
double  y 
)
inlinestaticprivate

Definition at line 175 of file TabulatedLabFrameHadronTensor.h.

175 { return x * y; }
list x
Definition: train.py:276
bool genie::TabulatedLabFrameHadronTensor::TableEntry::operator!= ( const TableEntry rhs) const
inline

Definition at line 132 of file TabulatedLabFrameHadronTensor.h.

132  {
133  return !operator==(rhs);
134  }
TableEntry genie::TabulatedLabFrameHadronTensor::TableEntry::operator* ( double  d) const
inline

Definition at line 104 of file TabulatedLabFrameHadronTensor.h.

TableEntry apply_to_elements(double d, double(*my_function)(double, double)) const
TableEntry genie::TabulatedLabFrameHadronTensor::TableEntry::operator* ( const TableEntry rhs) const
inline

Definition at line 117 of file TabulatedLabFrameHadronTensor.h.

118  { return apply_to_elements(rhs, &TableEntry::multiply); }
TableEntry apply_to_elements(double d, double(*my_function)(double, double)) const
TableEntry genie::TabulatedLabFrameHadronTensor::TableEntry::operator+ ( const TableEntry rhs) const
inline

Definition at line 111 of file TabulatedLabFrameHadronTensor.h.

112  { return apply_to_elements(rhs, &TableEntry::add); }
TableEntry apply_to_elements(double d, double(*my_function)(double, double)) const
TableEntry genie::TabulatedLabFrameHadronTensor::TableEntry::operator- ( const TableEntry rhs) const
inline

Definition at line 114 of file TabulatedLabFrameHadronTensor.h.

115  { return apply_to_elements(rhs, &TableEntry::subtract); }
TableEntry apply_to_elements(double d, double(*my_function)(double, double)) const
TableEntry genie::TabulatedLabFrameHadronTensor::TableEntry::operator/ ( double  d) const
inline

Definition at line 107 of file TabulatedLabFrameHadronTensor.h.

108  { return apply_to_elements(d, &TableEntry::divide); }
TableEntry apply_to_elements(double d, double(*my_function)(double, double)) const
TableEntry genie::TabulatedLabFrameHadronTensor::TableEntry::operator/ ( const TableEntry rhs) const
inline

Definition at line 120 of file TabulatedLabFrameHadronTensor.h.

121  { return apply_to_elements(rhs, &TableEntry::divide); }
TableEntry apply_to_elements(double d, double(*my_function)(double, double)) const
bool genie::TabulatedLabFrameHadronTensor::TableEntry::operator== ( const TableEntry rhs) const
inline

Definition at line 123 of file TabulatedLabFrameHadronTensor.h.

123  {
124  bool are_equal = this->W00 == rhs.W00;
125  if ( are_equal ) are_equal = this->Wxx == rhs.Wxx;
126  if ( are_equal ) are_equal = this->Wzz == rhs.Wzz;
127  if ( are_equal ) are_equal = this->ImWxy == rhs.ImWxy;
128  if ( are_equal ) are_equal = this->ReW0z == rhs.ReW0z;
129  return are_equal;
130  }
static double genie::TabulatedLabFrameHadronTensor::TableEntry::subtract ( double  x,
double  y 
)
inlinestaticprivate

Definition at line 174 of file TabulatedLabFrameHadronTensor.h.

174 { return x - y; }
list x
Definition: train.py:276

Member Data Documentation

double genie::TabulatedLabFrameHadronTensor::TableEntry::ImWxy

Definition at line 100 of file TabulatedLabFrameHadronTensor.h.

double genie::TabulatedLabFrameHadronTensor::TableEntry::ReW0z

Definition at line 101 of file TabulatedLabFrameHadronTensor.h.

double genie::TabulatedLabFrameHadronTensor::TableEntry::W00

Definition at line 97 of file TabulatedLabFrameHadronTensor.h.

double genie::TabulatedLabFrameHadronTensor::TableEntry::Wxx

Definition at line 98 of file TabulatedLabFrameHadronTensor.h.

double genie::TabulatedLabFrameHadronTensor::TableEntry::Wzz

Definition at line 99 of file TabulatedLabFrameHadronTensor.h.


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