9 #ifndef IMPCORE_CONJUGATE_GRADIENTS_H
10 #define IMPCORE_CONJUGATE_GRADIENTS_H
12 #include <IMP/core/core_config.h>
15 #include <cereal/access.hpp>
16 #include <cereal/types/base_class.hpp>
18 IMPCORE_BEGIN_NAMESPACE
39 std::string name =
"ConjugateGradients%1%");
61 NT &f, NT &dg, NT &dg1,
int max_steps,
67 friend class cereal::access;
69 template<
class Archive>
void serialize(Archive &ar) {
70 ar(cereal::base_class<AttributeOptimizer>(
this), threshold_, max_change_);
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Simple conjugate gradients optimizer.
Class for storing model, its restraints, constraints, and particles.
virtual double do_optimize(unsigned int ns)=0
override this function to do actual optimization
Base class for optimizers that act on individual attributes.
double Float
Basic floating-point value (could be float, double...)
Base class for optimizers that act on individual attributes.
void set_gradient_threshold(Float t)
Set the threshold for the minimum gradient.
void set_max_change(Float t)
Limit how far anything can change each time step.