9 #ifndef IMPKERNEL_DERIVATIVE_ACCUMULATOR_H
10 #define IMPKERNEL_DERIVATIVE_ACCUMULATOR_H
12 #include <IMP/kernel_config.h>
19 IMPKERNEL_BEGIN_NAMESPACE
32 : weight_(copy.weight_ * weight) {}
39 return value * weight_;
41 double get_weight()
const {
return weight_; }
50 IMPKERNEL_END_NAMESPACE
Helper functions to check for NaN or infinity.
#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.
A more IMP-like version of the std::vector.
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.
Helper macros for throwing and handling exceptions.
DerivativeAccumulator(double weight=1.0)
the weight is one by default
Macros to help in implementing Value objects.
Macros to help with objects that can be printed to a stream.
Class for adding derivatives from restraints to the model.