IMP  2.0.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 {
22  double initial_step_, line_step_, min_gradient_;
23 public:
24  //!
25  ConjugateGradients(Model *m=nullptr);
26 
27  //! Set the gradient threshold
28  void set_threshold(double mg) {
29  min_gradient_=mg;
30  }
31 
33 };
34 
35 
36 IMPGSL_END_NAMESPACE
37 
38 #endif /* IMPGSL_CONJUGATE_GRADIENTS_H */