IMP  2.1.1
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-2013 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  /** \deprecated_at{2.1} Pass a model to the constructor. */
27  IMPGSL_DEPRECATED_FUNCTION_DECL(2.1)
29 
30  //! Set the gradient threshold
31  void set_threshold(double mg) { min_gradient_ = mg; }
32  virtual Float do_optimize(unsigned int max_steps) IMP_OVERRIDE;
34 };
35 
36 IMPGSL_END_NAMESPACE
37 
38 #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.