1#ifndef __JFIT__JENERGY__
2#define __JFIT__JENERGY__
7#include "JLang/JComparable.hh"
8#include "JMath/JMath.hh"
16namespace JPP {
using namespace JFIT; }
21 using JLANG::JComparable;
29 public JMath<JEnergy>,
30 public JComparable<JEnergy>
58 return static_cast<const JEnergy&
>(*this);
69 static_cast<JEnergy&
>(*this) = energy;
172 return pow(10.0,
__X);
194 return getE() * log(10.0);
205 return std::fabs(energy.
__X);
216 return JEnergy(std::numeric_limits<double>::lowest());
227 return JEnergy(std::numeric_limits<double>::max());
Data structure for fit of energy.
double getE() const
Get energy.
bool less(const JEnergy &X) const
Less than method.
JEnergy & mul(const double value)
Multiplication operator.
JEnergy(const double X)
Constructor.
friend double fabs(const JEnergy &energy)
Get absolute value.
JEnergy()
Default constructor.
void putE(const double E)
Put energy.
void setEnergy(const JEnergy &energy)
Set Energy.
friend std::ostream & operator<<(std::ostream &out, const JEnergy &object)
Write object to output.
double JEnergy::* parameter_type
JEnergy & div(const double value)
Division operator.
double getDE() const
Get derivative of energy.
JEnergy & sub(const JEnergy &value)
Subtraction operator.
JEnergy & add(const JEnergy &value)
Addition operator.
static JEnergy max()
Get maximum possible value.
double getlog10E() const
Get energy.
JEnergy & negate()
Prefix unary minus.
friend std::istream & operator>>(std::istream &in, JEnergy &object)
Read object from input.
static JEnergy min()
Get minimum possible value.
static parameter_type pE()
const JEnergy & getEnergy() const
Get Energy.
Auxiliary classes and methods for linear and iterative data regression.