IMP  2.2.0
The Integrative Modeling Platform
gsl/ConjugateGradients.h
Go to the documentation of this file.
1 /**
2  * \file IMP/gsl/ConjugateGradients.h
3  * \brief A conjugate gradients optimizer from GSL
4  *
5  * Copyright 2007-2014 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPGSL_CONJUGATE_GRADIENTS_H
9 #define IMPGSL_CONJUGATE_GRADIENTS_H
10 
11 #include <IMP/gsl/gsl_config.h>
12 
13 #include "GSLOptimizer.h"
14 
15 IMPGSL_BEGIN_NAMESPACE
16 
17 //! A conjugate gradients optimizer taken from GSL
18 /** \see IMP::core::ConjugateGradients
19  */
20 class IMPGSLEXPORT ConjugateGradients : public GSLOptimizer {
21  double initial_step_, line_step_, min_gradient_;
22 
23  public:
24  //!
26 
27  //! Set the gradient threshold
28  void set_threshold(double mg) { min_gradient_ = mg; }
29  virtual Float do_optimize(unsigned int max_steps) IMP_OVERRIDE;
31 };
32 
33 IMPGSL_END_NAMESPACE
34 
35 #endif /* IMPGSL_CONJUGATE_GRADIENTS_H */
A base class for GSL-based optimizers.
Definition: GSLOptimizer.h:22
A conjugate gradients optimizer taken from GSL.
void set_threshold(double mg)
Set the gradient threshold.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
double Float
Basic floating-point value (could be float, double...)
Definition: base/types.h:20
A base class for GSL-based optimizers.
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:72