IMP logo
Public Member Functions | Static Public Member Functions
IMP::isd::Nuisance Class Reference

Detailed Description

Add nuisance parameter to particle.

The value of the nuisance parameter may express data or theory uncertainty. It can be initialized with or without specifying its value. Default is 1. On construction, the Nuisance is unbounded. It can be bounded with set_upper and set_lower. Setting it to values outside of bounds results in setting it to the bound value.

+ Inheritance diagram for IMP::isd::Nuisance:

List of all members.

Public Member Functions

 Nuisance (Model *m, ParticleIndex id)
 Nuisance (::IMP::Particle *p)
void add_to_nuisance_derivative (Float d, DerivativeAccumulator &accum)
Float get_lower () const
Float get_nuisance () const
Float get_nuisance_derivative () const
bool get_nuisance_is_optimized () const
Float get_upper () const
bool has_lower () const
bool has_upper () const
void set_lower (Float d)
void set_lower (Particle *d)
void set_nuisance (Float d)
void set_nuisance_is_optimized (bool val)
void set_upper (Float d)
void set_upper (Particle *d)
void show (std::ostream &out=std::cout) const
- Public Member Functions inherited from IMP::Decorator
std::size_t __hash__ () const
ParticleIndex get_particle_index () const
Particleget_particle () const
Modelget_model () const
 Returns the Model containing the particle.
 Decorator (Particle *p)
 Decorator ()

Static Public Member Functions

static Nuisance decorate_particle (::IMP::Particle *p)
static FloatKey get_lower_key ()
static ParticleKey get_lower_particle_key ()
static FloatKey get_nuisance_key ()
static FloatKey get_upper_key ()
static ParticleKey get_upper_particle_key ()
static bool particle_is_instance (Particle *p)
 Return true if the particle can be cast to the decorator.
static Nuisance setup_particle (Particle *p, double nuisance=1.0)
static Decorator setup_particle (Particle *p, extra_arguments)

Additional Inherited Members

- Protected Member Functions inherited from IMP::Decorator
 Decorator (Model *m, ParticleIndex pi)
 Decorator (Particle *p)
int compare (base::Object *o) const

Member Function Documentation

static bool IMP::isd::Nuisance::particle_is_instance ( Particle p)
static

Return true if the particle can be cast to the decorator.

That is, if particle_is_instance() returns true, then it is legal to construct an instance of the decorator with that particle. If not, setup_particle() must be called first.

// it is false
std::cout << IMP::core::XYZ::particle_is_instance(p) << std::endl;
// As a result this is an error
// now set it up
// now it is true
std::cout << IMP::core::XYZ::particle_is_instance(p) << std::endl;
// and now this code is OK

Reimplemented from IMP::Decorator.

Reimplemented in IMP::isd::Switching, and IMP::isd::Scale.

void IMP::isd::Nuisance::set_lower ( Float  d)

set upper and lower bound of nuisance by specifying either a float or another nuisance. Both can be set at the same time in which case the upper bound is the minimum of the two values.


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

Generated on Tue May 22 2012 23:33:36 for IMP by doxygen 1.8.1