BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ROOT::Math::MinimTransformVariable Class Reference

Description

MinimTransformVariable class Contains meta information of the variables such as bounds, fix flags and deals with transformation of the variable The class does not contain the values and the step size (error) of the variable This is an internal class used by the MinimTransformFunction class

Definition at line 48 of file MinimTransformVariable.h.

Collaboration diagram for ROOT::Math::MinimTransformVariable:
[legend]

Public Member Functions

 MinimTransformVariable ()
 
 MinimTransformVariable (const MinimTransformVariable &rhs)
 
 MinimTransformVariable (double lower, double upper, SinVariableTransformation *trafo)
 
 MinimTransformVariable (double lower, SqrtLowVariableTransformation *trafo)
 
 MinimTransformVariable (double upper, SqrtUpVariableTransformation *trafo)
 
 MinimTransformVariable (double value)
 
double DerivativeIntToExt (double x) const
 
double ExternalToInternal (double x) const
 
double FixValue () const
 
bool HasLowerBound () const
 
bool HasUpperBound () const
 
double InternalToExternal (double x) const
 
bool IsFixed () const
 
bool IsLimited () const
 
double LowerBound () const
 
MinimTransformVariableoperator= (const MinimTransformVariable &rhs)
 
double UpperBound () const
 

Private Attributes

bool fBounds
 
bool fFix
 
bool fLowBound
 
double fLower
 
std::unique_ptr< MinimizerVariableTransformationfTransform
 
bool fUpBound
 
double fUpper
 

Constructor & Destructor Documentation

◆ MinimTransformVariable() [1/6]

ROOT::Math::MinimTransformVariable::MinimTransformVariable ( )
inline

◆ MinimTransformVariable() [2/6]

ROOT::Math::MinimTransformVariable::MinimTransformVariable ( double  value)
inline

Definition at line 61 of file MinimTransformVariable.h.

61  :
62  fFix(true), fLowBound(false), fUpBound(false), fBounds(false),
63  fLower(value), fUpper(value)
64  {}

◆ MinimTransformVariable() [3/6]

ROOT::Math::MinimTransformVariable::MinimTransformVariable ( double  lower,
double  upper,
SinVariableTransformation trafo 
)
inline

Definition at line 67 of file MinimTransformVariable.h.

67  :
68  fFix(false), fLowBound(false), fUpBound(false), fBounds(true),
69  fTransform(trafo),
70  fLower(lower), fUpper(upper)
71  { }
std::unique_ptr< MinimizerVariableTransformation > fTransform

◆ MinimTransformVariable() [4/6]

ROOT::Math::MinimTransformVariable::MinimTransformVariable ( double  lower,
SqrtLowVariableTransformation trafo 
)
inline

Definition at line 74 of file MinimTransformVariable.h.

74  :
75  fFix(false), fLowBound(true), fUpBound(false), fBounds(false),
76  fTransform(trafo), fLower(lower), fUpper(lower)
77  {}

◆ MinimTransformVariable() [5/6]

ROOT::Math::MinimTransformVariable::MinimTransformVariable ( double  upper,
SqrtUpVariableTransformation trafo 
)
inline

Definition at line 80 of file MinimTransformVariable.h.

80  :
81  fFix(false), fLowBound(true), fUpBound(false), fBounds(false),
82  fTransform(trafo), fLower(upper), fUpper(upper)
83  {}

◆ MinimTransformVariable() [6/6]

ROOT::Math::MinimTransformVariable::MinimTransformVariable ( const MinimTransformVariable rhs)
inline

Definition at line 86 of file MinimTransformVariable.h.

86  :
87  fFix(rhs.fFix), fLowBound(rhs.fLowBound), fUpBound(rhs.fUpBound), fBounds(rhs.fBounds),
88  fLower(rhs.fLower), fUpper(rhs.fUpper)
89  {
90  // swap unique_ptr
91  fTransform.swap( const_cast<MinimTransformVariable &>( rhs).fTransform) ;
92  }

References fTransform.

Member Function Documentation

◆ DerivativeIntToExt()

double ROOT::Math::MinimTransformVariable::DerivativeIntToExt ( double  x) const
inline

Definition at line 129 of file MinimTransformVariable.h.

129  {
130  return (fTransform.get() ) ? fTransform->DInt2Ext( x, fLower, fUpper) : 1.0;
131  }

References fLower, fTransform, and fUpper.

Referenced by ROOT::Math::MinimTransformFunction::DoDerivative().

◆ ExternalToInternal()

double ROOT::Math::MinimTransformVariable::ExternalToInternal ( double  x) const
inline

Definition at line 134 of file MinimTransformVariable.h.

134  {
135  return (fTransform.get() ) ? fTransform->Ext2int(x, fLower, fUpper) : x;
136  }

References fLower, fTransform, and fUpper.

◆ FixValue()

double ROOT::Math::MinimTransformVariable::FixValue ( ) const
inline

Definition at line 121 of file MinimTransformVariable.h.

121 { return fLower; }

References fLower.

◆ HasLowerBound()

bool ROOT::Math::MinimTransformVariable::HasLowerBound ( ) const
inline

Definition at line 113 of file MinimTransformVariable.h.

113 { return fLowBound || fBounds; }

References fBounds, and fLowBound.

◆ HasUpperBound()

bool ROOT::Math::MinimTransformVariable::HasUpperBound ( ) const
inline

Definition at line 115 of file MinimTransformVariable.h.

115 { return fUpBound || fBounds; }

References fBounds, and fUpBound.

◆ InternalToExternal()

double ROOT::Math::MinimTransformVariable::InternalToExternal ( double  x) const
inline

Definition at line 124 of file MinimTransformVariable.h.

124  {
125  return (fTransform.get() ) ? fTransform->Int2ext(x, fLower, fUpper) : x;
126  }

References fLower, fTransform, and fUpper.

◆ IsFixed()

bool ROOT::Math::MinimTransformVariable::IsFixed ( ) const
inline

Definition at line 109 of file MinimTransformVariable.h.

109 { return fFix; }

References fFix.

◆ IsLimited()

bool ROOT::Math::MinimTransformVariable::IsLimited ( ) const
inline

Definition at line 111 of file MinimTransformVariable.h.

111 { return fBounds || fLowBound || fUpBound; }

References fBounds, fLowBound, and fUpBound.

Referenced by ROOT::Math::MinimTransformFunction::DoDerivative().

◆ LowerBound()

double ROOT::Math::MinimTransformVariable::LowerBound ( ) const
inline

Definition at line 117 of file MinimTransformVariable.h.

117 { return fLower; }

References fLower.

◆ operator=()

MinimTransformVariable& ROOT::Math::MinimTransformVariable::operator= ( const MinimTransformVariable rhs)
inline

Definition at line 95 of file MinimTransformVariable.h.

95  {
96  if (&rhs == this) return *this;
97  fFix = rhs.fFix;
98  fLowBound = rhs.fLowBound;
99  fUpBound = rhs.fUpBound;
100  fBounds = rhs.fBounds;
101  fLower = rhs.fLower; fUpper = rhs.fUpper;
102 
103  // swap unique_ptr
104  fTransform.swap( const_cast<MinimTransformVariable &>( rhs).fTransform) ;
105  return *this;
106  }

References fBounds, fFix, fLowBound, fLower, fTransform, fUpBound, and fUpper.

◆ UpperBound()

double ROOT::Math::MinimTransformVariable::UpperBound ( ) const
inline

Definition at line 119 of file MinimTransformVariable.h.

119 { return fUpper; }

References fUpper.

Member Data Documentation

◆ fBounds

bool ROOT::Math::MinimTransformVariable::fBounds
private

Definition at line 143 of file MinimTransformVariable.h.

Referenced by HasLowerBound(), HasUpperBound(), IsLimited(), and operator=().

◆ fFix

bool ROOT::Math::MinimTransformVariable::fFix
private

Definition at line 140 of file MinimTransformVariable.h.

Referenced by IsFixed(), and operator=().

◆ fLowBound

bool ROOT::Math::MinimTransformVariable::fLowBound
private

Definition at line 141 of file MinimTransformVariable.h.

Referenced by HasLowerBound(), IsLimited(), and operator=().

◆ fLower

double ROOT::Math::MinimTransformVariable::fLower
private

◆ fTransform

std::unique_ptr< MinimizerVariableTransformation> ROOT::Math::MinimTransformVariable::fTransform
private

◆ fUpBound

bool ROOT::Math::MinimTransformVariable::fUpBound
private

Definition at line 142 of file MinimTransformVariable.h.

Referenced by HasUpperBound(), IsLimited(), and operator=().

◆ fUpper

double ROOT::Math::MinimTransformVariable::fUpper
private

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