10 #ifndef IMPKERNEL_DERIVATIVE_ACCUMULATOR_H
11 #define IMPKERNEL_DERIVATIVE_ACCUMULATOR_H
13 #include <IMP/kernel/kernel_config.h>
20 IMPKERNEL_BEGIN_NAMESPACE
33 : weight_(copy.weight_ * weight) {}
40 return value * weight_;
42 double get_weight()
const {
return weight_; }
51 IMPKERNEL_END_NAMESPACE
Declare an efficient stl-compatible map.
Class for adding derivatives from restraints to the model.
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
DerivativeAccumulator(const DerivativeAccumulator ©, double weight)
The weight is multiplied by the new weight.
DerivativeAccumulator(double weight=1.0)
the weight is one by default
Exception definitions and assertions.
double operator()(const double value) const
Scale a value appropriately.
#define IMP_INTERNAL_CHECK(expr, message)
An assertion to check for internal errors in IMP. An IMP::ErrorException will be thrown.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
bool isnan(const T &a)
Return true if a number is NaN.
Exception definitions and assertions.
Various general useful macros for IMP.
Various general useful macros for IMP.