queso-0.53.0
Optimizer.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2015 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef UQ_BASE_OPTIMIZER_H
26 #define UQ_BASE_OPTIMIZER_H
27 
28 namespace QUESO {
29 
41 class Vector;
42 class OptimizerMonitor;
43 
45 public:
47  BaseOptimizer();
48 
50  virtual ~BaseOptimizer();
51 
53 
56  virtual void minimize(OptimizerMonitor* monitor) = 0;
57 
59 
62  unsigned int getMaxIterations() const;
63 
65 
68  double getTolerance() const;
69 
71 
74  double getFiniteDifferenceStepSize() const;
75 
77  void setMaxIterations(unsigned int maxIterations);
78 
80  void setTolerance(double tolerance);
81 
83  void setFiniteDifferenceStepSize(double h);
84 
85 protected:
86 
87  unsigned int m_maxIterations;
88  double m_tolerance;
90 };
91 
92 } // End namespace QUESO
93 
94 #endif // UQ_BASE_OPTIMIZER_H
unsigned int m_maxIterations
Definition: Optimizer.h:87
virtual void minimize(OptimizerMonitor *monitor)=0
Minimize the objective function, starting at m_initialPoint.
double m_finiteDifferenceStepSize
Definition: Optimizer.h:89
void setFiniteDifferenceStepSize(double h)
Sets the step to use in the finite difference derivative.
Definition: Optimizer.C:71
void setTolerance(double tolerance)
Sets the tolerance the optimizer will use to test for an extremum.
Definition: Optimizer.C:65
A base class for handling optimisation of scalar functions.
Definition: Optimizer.h:44
BaseOptimizer()
Default constructor.
Definition: Optimizer.C:29
void setMaxIterations(unsigned int maxIterations)
Sets the maximum number of iterations to be used by the optimizer.
Definition: Optimizer.C:59
unsigned int getMaxIterations() const
Returns the maximum number of iterations the optimizer will do.
Definition: Optimizer.C:41
double getTolerance() const
Returns the tolerance used to test for an extremum in the optimizer.
Definition: Optimizer.C:47
Object to monitor convergence of optimizers.
virtual ~BaseOptimizer()
Destructor.
Definition: Optimizer.C:36
double getFiniteDifferenceStepSize() const
Returns the step size used in the finite difference formula.
Definition: Optimizer.C:53

Generated on Thu Jun 11 2015 13:52:31 for queso-0.53.0 by  doxygen 1.8.5