-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re #5851. Added DampingMinimizer. Added properties to minimizers.
- Loading branch information
1 parent
a506d66
commit 0522bd2
Showing
16 changed files
with
265 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...CurveFitting/src/FuncMinimizerFactory.cpp → ...ramework/API/src/FuncMinimizerFactory.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
Code/Mantid/Framework/CurveFitting/inc/MantidCurveFitting/DampingMinimizer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#ifndef MANTID_CURVEFITTING_DAMPINGMINIMIZER_H_ | ||
#define MANTID_CURVEFITTING_DAMPINGMINIMIZER_H_ | ||
|
||
//---------------------------------------------------------------------- | ||
// Includes | ||
//---------------------------------------------------------------------- | ||
#include "MantidAPI/IFuncMinimizer.h" | ||
#include "MantidCurveFitting/GSLVector.h" | ||
#include "MantidCurveFitting/GSLMatrix.h" | ||
|
||
namespace Mantid | ||
{ | ||
namespace CurveFitting | ||
{ | ||
|
||
class CostFuncLeastSquares; | ||
|
||
/** | ||
Implements a least squares minimization algorithm with damping. | ||
@author Roman Tolchenov, Tessella plc | ||
Copyright © 2009 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory | ||
This file is part of Mantid. | ||
Mantid is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
Mantid is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>. | ||
Code Documentation is available at: <http://doxygen.mantidproject.org> | ||
*/ | ||
class DLLExport DampingMinimizer : public API::IFuncMinimizer | ||
{ | ||
public: | ||
/// Constructor | ||
DampingMinimizer(); | ||
/// Name of the minimizer. | ||
std::string name() const {return "DampingMinimizer";} | ||
|
||
/// Initialize minimizer, i.e. pass a function to minimize. | ||
virtual void initialize(API::ICostFunction_sptr function); | ||
/// Do one iteration. | ||
virtual bool iterate(); | ||
/// Return current value of the cost function | ||
virtual double costFunctionVal(); | ||
|
||
private: | ||
/// Pointer to the cost function. Must be the least squares. | ||
boost::shared_ptr<CostFuncLeastSquares> m_leastSquares; | ||
/// Relative tolerance. | ||
double m_relTol; | ||
/// The damping mu parameter in the Levenberg-Marquardt method. | ||
//double m_damping; | ||
/// Static reference to the logger class | ||
static Kernel::Logger& g_log; | ||
}; | ||
|
||
|
||
} // namespace CurveFitting | ||
} // namespace Mantid | ||
|
||
#endif /*MANTID_CURVEFITTING_DAMPINGMINIMIZER_H_*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.