queso-0.53.0
Optimizer.C
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 #include <queso/Optimizer.h>
26 
27 namespace QUESO {
28 
30  : m_maxIterations(100),
31  m_tolerance(1e-3),
32  m_finiteDifferenceStepSize(1e-4)
33 {
34 }
35 
37 {
38 }
39 
40 unsigned int
42 {
43  return this->m_maxIterations;
44 }
45 
46 double
48 {
49  return this->m_tolerance;
50 }
51 
52 double
54 {
55  return this->m_finiteDifferenceStepSize;
56 }
57 
58 void
59 BaseOptimizer::setMaxIterations(unsigned int maxIterations)
60 {
61  this->m_maxIterations = maxIterations;
62 }
63 
64 void
65 BaseOptimizer::setTolerance(double tolerance)
66 {
67  this->m_tolerance = tolerance;
68 }
69 
70 void
72 {
74 }
75 
76 } // End namespace QUESO
unsigned int m_maxIterations
Definition: Optimizer.h:87
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
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
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