bpp-core  2.1.0
 All Classes Namespaces Files Functions Variables Typedefs Friends
bpp::PlaceboTransformedParameter Class Reference

'Placebo' parameter transformation from ] b, +inf [ or ] -inf, b [ to ]-inf, + inf [. More...

#include <Bpp/Numeric/TransformedParameter.h>

+ Inheritance diagram for bpp::PlaceboTransformedParameter:
+ Collaboration diagram for bpp::PlaceboTransformedParameter:

Public Member Functions

 PlaceboTransformedParameter (const std::string &name, double value)
 
PlaceboTransformedParameterclone () const
 Create a copy of this object and send a pointer to it. More...
 
void setOriginalValue (double value) throw (ConstraintException)
 Set the value of the parameter using the orignal coordinate system. More...
 
double getOriginalValue () const
 
double getFirstOrderDerivative () const throw (NotImplementedException)
 
double getSecondOrderDerivative () const throw (NotImplementedException)
 
virtual void setName (const std::string &name)
 Set the name of this parameter. More...
 
virtual void setValue (double value) throw (ConstraintException)
 Set the value of this parameter. More...
 
void setPrecision (double precision)
 Set the precision of this parameter. More...
 
virtual const std::string & getName () const
 Get the name of this parameter. More...
 
virtual double getValue () const
 Get the value of this parameter. More...
 
virtual double getPrecision () const
 Get the precision of this parameter. More...
 
virtual const ConstraintgetConstraint () const
 Return the constraint associated to this parameter if there is one. More...
 
virtual ConstraintgetConstraint ()
 Return the constraint associated to this parameter if there is one. More...
 
virtual bool hasConstraint () const
 Tells if this parameter has a constraint. More...
 
virtual const ConstraintremoveConstraint ()
 Remove the constraint associated to this parameter. More...
 
virtual void setConstraint (Constraint *constraint, bool attach=false)
 Set a constraint to this parameter. More...
 
virtual void addParameterListener (ParameterListener *listener, bool attachListener=true)
 Add a new listener to this parameter. More...
 
virtual void removeParameterListener (const std::string &listenerId)
 Remove all listeners with a given id from this parameter. More...
 
virtual bool hasParameterListener (const std::string &listenerId)
 Tell is there is a listener with a given id from this parameter. More...
 

Static Public Attributes

static const IntervalConstraint R_PLUS
 
static const IntervalConstraint R_PLUS_STAR
 
static const IntervalConstraint R_MINUS
 
static const IntervalConstraint R_MINUS_STAR
 
static const IntervalConstraint PROP_CONSTRAINT_IN
 
static const IntervalConstraint PROP_CONSTRAINT_EX
 

Protected Member Functions

void fireParameterNameChanged (ParameterEvent &event)
 
void fireParameterValueChanged (ParameterEvent &event)
 

Protected Attributes

std::string name_
 
double value_
 
double precision_
 
Constraintconstraint_
 
bool attach_
 
std::vector< ParameterListener * > listeners_
 
std::vector< bool > listenerAttach_
 

Detailed Description

'Placebo' parameter transformation from ] b, +inf [ or ] -inf, b [ to ]-inf, + inf [.

The class create a Transformed parameter which is exactly the same as a standard parameter. It only implements the setOriginalValue and getOriginalValue methods, and remove the constraint.

Definition at line 282 of file TransformedParameter.h.

Constructor & Destructor Documentation

bpp::PlaceboTransformedParameter::PlaceboTransformedParameter ( const std::string &  name,
double  value 
)
inline

Definition at line 286 of file TransformedParameter.h.

Member Function Documentation

virtual void bpp::Parameter::addParameterListener ( ParameterListener listener,
bool  attachListener = true 
)
inlinevirtualinherited

Add a new listener to this parameter.

Parameters
listenerThe listener to add.
attachListenerTell if the parameter will own this listener. If so, deep copies will be made when cloning the parameter, and the listener will be destroyed upon destruction of the parameter or upon removal. Alternatively, only superficial copies will be made, and the listener will persist if the parameter is destroyed.

Definition at line 299 of file Parameter.h.

References bpp::Parameter::listenerAttach_, and bpp::Parameter::listeners_.

Referenced by bpp::AbstractParameterAliasable::aliasParameters().

PlaceboTransformedParameter* bpp::PlaceboTransformedParameter::clone ( ) const
inlinevirtual

Create a copy of this object and send a pointer to it.

Returns
A pointer toward the copy object.

Implements bpp::TransformedParameter.

Definition at line 290 of file TransformedParameter.h.

void bpp::Parameter::fireParameterNameChanged ( ParameterEvent event)
inlineprotectedinherited

Definition at line 321 of file Parameter.h.

References bpp::Parameter::listeners_, and bpp::Parameter::listeners_.

Referenced by bpp::Parameter::setName().

void bpp::Parameter::fireParameterValueChanged ( ParameterEvent event)
inlineprotectedinherited

Definition at line 326 of file Parameter.h.

References bpp::Parameter::listeners_, and bpp::Parameter::listeners_.

virtual const Constraint* bpp::Parameter::getConstraint ( ) const
inlinevirtualinherited

Return the constraint associated to this parameter if there is one.

Returns
A pointer toward the constraint, or NULL if there is no constraint.

Definition at line 255 of file Parameter.h.

References bpp::Parameter::constraint_.

Referenced by bpp::AbstractParameterAliasable::aliasParameters(), bpp::AbstractParameterAliasable::aliasParameters(), bpp::ReparametrizationFunctionWrapper::init_(), bpp::ParameterList::matchParametersValues(), bpp::ParameterList::setParametersValues(), and bpp::ParameterList::testParametersValues().

virtual Constraint* bpp::Parameter::getConstraint ( )
inlinevirtualinherited

Return the constraint associated to this parameter if there is one.

Returns
A pointer toward the constraint, or NULL if there is no constraint.

Definition at line 262 of file Parameter.h.

References bpp::Parameter::constraint_.

double bpp::PlaceboTransformedParameter::getFirstOrderDerivative ( ) const throw (NotImplementedException)
inlinevirtual
Returns
The first order derivative of the transformation at the original point.
Exceptions
NotImplementedExceptionif the transformation does not support derivation or if the derivation was not implemented.

Implements bpp::TransformedParameter.

Definition at line 303 of file TransformedParameter.h.

double bpp::PlaceboTransformedParameter::getOriginalValue ( ) const
inlinevirtual
Returns
The current value of the parameter in orignal coordinates.

Implements bpp::TransformedParameter.

Definition at line 298 of file TransformedParameter.h.

References bpp::Parameter::getValue().

virtual double bpp::Parameter::getPrecision ( ) const
inlinevirtualinherited

Get the precision of this parameter.

Returns
The precision value.

Definition at line 248 of file Parameter.h.

References bpp::Parameter::precision_.

double bpp::PlaceboTransformedParameter::getSecondOrderDerivative ( ) const throw (NotImplementedException)
inlinevirtual
Returns
The second order derivative of the transformation at the original point.
Exceptions
NotImplementedExceptionif the transformation does not support derivation or if the derivation was not implemented.

Implements bpp::TransformedParameter.

Definition at line 305 of file TransformedParameter.h.

virtual double bpp::Parameter::getValue ( ) const
inlinevirtualinherited

Get the value of this parameter.

Returns
The parameter value.

Definition at line 241 of file Parameter.h.

References bpp::Parameter::value_.

Referenced by bpp::ParametersStopCondition::getCurrentTolerance(), bpp::NumCalcApplicationTools::getDefaultValue(), bpp::RTransformedParameter::getFirstOrderDerivative(), bpp::IntervalTransformedParameter::getFirstOrderDerivative(), bpp::RTransformedParameter::getOriginalValue(), bpp::IntervalTransformedParameter::getOriginalValue(), getOriginalValue(), bpp::AbstractParametrizable::getParameterValue(), bpp::ParameterList::getParameterValue(), bpp::RTransformedParameter::getSecondOrderDerivative(), bpp::IntervalTransformedParameter::getSecondOrderDerivative(), bpp::TestFunction::getValue(), bpp::TestFunction::getValue(), bpp::ReparametrizationFunctionWrapper::init_(), bpp::ReparametrizationFunctionWrapper::init_(), bpp::ReparametrizationFunctionWrapper::init_(), bpp::ReparametrizationFunctionWrapper::init_(), bpp::ReparametrizationFunctionWrapper::init_(), bpp::ReparametrizationFunctionWrapper::init_(), bpp::ReparametrizationFunctionWrapper::init_(), bpp::ReparametrizationFunctionWrapper::init_(), bpp::ReparametrizationFunctionWrapper::init_(), bpp::ParametersStopCondition::isToleranceReached(), bpp::ParameterList::matchParametersValues(), bpp::ParameterList::matchParametersValues(), bpp::ParameterList::setAllParametersValues(), bpp::ParameterList::setAllParametersValues(), bpp::ParameterList::setAllParametersValues(), bpp::ParameterList::setParametersValues(), bpp::ParameterList::testParametersValues(), and bpp::ParameterList::testParametersValues().

virtual bool bpp::Parameter::hasConstraint ( ) const
inlinevirtualinherited
bool Parameter::hasParameterListener ( const std::string &  listenerId)
virtualinherited

Tell is there is a listener with a given id from this parameter.

Parameters
listenerIdThe id of listener to remove.
Returns
True if at list one listener with the given id was found.

Definition at line 187 of file Parameter.cpp.

References bpp::Parameter::listeners_, and bpp::Parameter::listeners_.

const Constraint * Parameter::removeConstraint ( )
virtualinherited

Remove the constraint associated to this parameter.

Warning! The contraint objet is not deleted.

Returns
A pointer toward the formerly used contraint.

Definition at line 163 of file Parameter.cpp.

References bpp::Parameter::constraint_, and bpp::Parameter::constraint_.

Referenced by bpp::SimpleDiscreteDistribution::restrictToConstraint().

void Parameter::removeParameterListener ( const std::string &  listenerId)
virtualinherited

Remove all listeners with a given id from this parameter.

Parameters
listenerIdThe id of listener to remove.

Definition at line 172 of file Parameter.cpp.

References bpp::Parameter::listenerAttach_, bpp::Parameter::listenerAttach_, bpp::Parameter::listeners_, bpp::Parameter::listeners_, bpp::Parameter::listeners_, and bpp::Parameter::listeners_.

void Parameter::setConstraint ( Constraint constraint,
bool  attach = false 
)
virtualinherited
virtual void bpp::Parameter::setName ( const std::string &  name)
inlinevirtualinherited

Set the name of this parameter.

Parameters
namethe new parameter name.

Definition at line 208 of file Parameter.h.

References bpp::Parameter::fireParameterNameChanged(), and bpp::Parameter::name_.

void bpp::PlaceboTransformedParameter::setOriginalValue ( double  value) throw (ConstraintException)
inlinevirtual

Set the value of the parameter using the orignal coordinate system.

Parameters
valueParameter value in original coordinates.
Exceptions
ConstraintExceptionif the value is not correct.

Implements bpp::TransformedParameter.

Definition at line 293 of file TransformedParameter.h.

References bpp::Parameter::setValue().

void Parameter::setPrecision ( double  precision)
inherited

Set the precision of this parameter.

Parameters
precisionthe new parameter precision.

Precision:

Definition at line 136 of file Parameter.cpp.

References bpp::Parameter::precision_.

Member Data Documentation

std::string bpp::Parameter::name_
protectedinherited
double bpp::Parameter::precision_
protectedinherited
const IntervalConstraint Parameter::PROP_CONSTRAINT_EX
staticinherited

Definition at line 338 of file Parameter.h.

const IntervalConstraint Parameter::R_MINUS
staticinherited

Definition at line 335 of file Parameter.h.

const IntervalConstraint Parameter::R_MINUS_STAR
staticinherited

Definition at line 336 of file Parameter.h.

const IntervalConstraint Parameter::R_PLUS_STAR
staticinherited
double bpp::Parameter::value_
protectedinherited

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