10 #ifndef IMPKERNEL_DERIVATIVE_ACCUMULATOR_H
11 #define IMPKERNEL_DERIVATIVE_ACCUMULATOR_H
13 #include <IMP/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.
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
double operator()(const double value) const
Scale a value appropriately.
Exception definitions and assertions.
DerivativeAccumulator(const DerivativeAccumulator ©, double weight)
The weight is multiplied by the new weight.
#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.
DerivativeAccumulator(double weight=1.0)
the weight is one by default
Various general useful macros for IMP.
Various general useful macros for IMP.
Class for adding derivatives from restraints to the model.