OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
Simple Gradient Descent optimizer for ossim. More...
#include <ossimGDoptimizer.h>
Public Member Functions | |
ossimGDoptimizer () | |
Public Copy constructor. More... | |
ossimGDoptimizer (const ossimGDoptimizer &src) | |
Public Copy constructor. More... | |
~ossimGDoptimizer () | |
Destroys the object !DOES NOT DELETE FUNCTION! More... | |
ossimGDoptimizer (ossimTerm *function) | |
Public Constructor with a preset function. More... | |
bool | setFunction (ossimTerm *function) |
Sets the function to be optimized. More... | |
std::vector< ossim_float64 > | optimize (std::vector< ossim_float64 > startPoint, ossim_float64 gamma=0.001, ossim_float64 precision=0.0001, ossim_uint32 maxEpoch=10000) const |
Optimizes the function. More... | |
Private Attributes | |
ossimTerm * | m_func |
Simple Gradient Descent optimizer for ossim.
See top level LICENSE.txt file.
Definition at line 19 of file ossimGDoptimizer.h.
ossimGDoptimizer::ossimGDoptimizer | ( | ) |
Public Copy constructor.
Simple Gradient Descent optimizer for ossim.
See top level LICENSE.txt file.
Public Copy constructor
Definition at line 17 of file ossimGDoptimizer.cpp.
References m_func.
ossimGDoptimizer::ossimGDoptimizer | ( | const ossimGDoptimizer & | src | ) |
Public Copy constructor.
[in] | src | The object to be copied (copies pointer not a copy of function) |
Definition at line 27 of file ossimGDoptimizer.cpp.
References m_func.
ossimGDoptimizer::~ossimGDoptimizer | ( | ) |
Destroys the object !DOES NOT DELETE FUNCTION!
Definition at line 35 of file ossimGDoptimizer.cpp.
ossimGDoptimizer::ossimGDoptimizer | ( | ossimTerm * | function | ) |
Public Constructor with a preset function.
function | The function to be optimized |
Definition at line 44 of file ossimGDoptimizer.cpp.
References m_func.
std::vector< ossim_float64 > ossimGDoptimizer::optimize | ( | std::vector< ossim_float64 > | point, |
ossim_float64 | gamma = 0.001 , |
||
ossim_float64 | precision = 0.0001 , |
||
ossim_uint32 | maxEpoch = 10000 |
||
) | const |
Optimizes the function.
[in] | startPoint | The start point at which the algorithm starts its descent |
[in] | gamma | Determins the step size as a function of the gradient |
[in] | precision | The stopping point at which the algorithm will no longer descend |
[in] | maxEpoch | The stopping point to limit infinite loops. |
Definition at line 76 of file ossimGDoptimizer.cpp.
References ossimTerm::derivative(), and m_func.
bool ossimGDoptimizer::setFunction | ( | ossimTerm * | function | ) |
Sets the function to be optimized.
function | The function to be optimized |
Definition at line 56 of file ossimGDoptimizer.cpp.
References m_func.
|
private |
Definition at line 68 of file ossimGDoptimizer.h.
Referenced by optimize(), ossimGDoptimizer(), and setFunction().