hp2D::Extrema< T > Class Template Reference
An interface class that computes the maximum/minimum of a function represented as an ElementFormula on an space on hp2D::Quad<Real>
only.
More...
#include <extrema.hh>
Public Member Functions | |
Extrema (const concepts::SpaceOnCells< Real > &spc, const concepts::ElementFormula< Real > &formula, const concepts::ElementFormula< Real2d > *formulaGrad=0, uint np=2, bool report=false) | |
http://www.alglib.net/translator/man/manual.cpp.html#unit_minbleic More... | |
Real | get () const |
Static Public Attributes | |
static Extrema< T > * | pt2Object |
Inner static pointer to object, used by the wrapper. More... | |
Protected Member Functions | |
virtual std::ostream & | info (std::ostream &os) const override |
Returns information in an output stream. More... | |
Private Member Functions | |
Real | compute_ (const hp2D::Quad< concepts::Real > &quad) |
void | evalsF_ (const alglib::real_1d_array &x, double &func, void *ptr) |
void | evalsG_ (const alglib::real_1d_array &x, double &func, alglib::real_1d_array &grad, void *ptr) |
Real | get_ (const concepts::Set< Real > &vals) const |
void | reportOutput_ (uint K, const std::string &point, int terminationType) const |
Can report the current convergence behaviour if requested via setReport() More... | |
Real | sign_ () const |
Static Private Member Functions | |
static void | Wrapper_To_Call_Fun_ (const alglib::real_1d_array &x, double &func, void *ptr) |
static void | Wrapper_To_Call_Grad_ (const alglib::real_1d_array &x, double &func, alglib::real_1d_array &grad, void *ptr) |
Private Attributes | |
Real | curFunc_ |
const hp2D::Quad< Real > * | elm_ |
std::set< Real > | extrema_ |
const concepts::ElementFormula< Real > & | frm_ |
const concepts::ElementFormula< Real2d > * | frmGrad_ |
uint | np_ |
std::vector< std::string > | points_ |
bool | report_ |
const concepts::SpaceOnCells< Real > & | spc_ |
concepts::Sequence< Real > | vals_ |
Detailed Description
template<concepts::Optimize T>
class hp2D::Extrema< T >
An interface class that computes the maximum/minimum of a function represented as an ElementFormula on an space on hp2D::Quad<Real>
only.
Definition at line 42 of file extrema.hh.
Constructor & Destructor Documentation
◆ Extrema()
hp2D::Extrema< T >::Extrema | ( | const concepts::SpaceOnCells< Real > & | spc, |
const concepts::ElementFormula< Real > & | formula, | ||
const concepts::ElementFormula< Real2d > * | formulaGrad = 0 , |
||
uint | np = 2 , |
||
bool | report = false |
||
) |
http://www.alglib.net/translator/man/manual.cpp.html#unit_minbleic
There are two modi implemented. We apply an gradient approximation active set strategy, that is numerical unstable and expensive in the sense of function evaluations, if the gradient of the function is not given.
Therefore with the alternative uses the analytical gradient of local solution, that should be the choice.
The number controls the number of startpoints that are equidistant distributed on the inner of . For local solution where more that a local maximum is supposed this might be usefull.
- Parameters
-
spc space on which the formula is given formula function formulaGrad gradient of the function (default = 0) np np^2 = number of equidistant start points in one direction (defualt np=2) report set 'true' for detailed report
Member Function Documentation
◆ compute_()
|
private |
◆ evalsF_()
|
private |
◆ evalsG_()
|
private |
◆ get()
Real hp2D::Extrema< T >::get | ( | ) | const |
◆ get_()
|
private |
◆ info()
|
overrideprotectedvirtual |
Returns information in an output stream.
Reimplemented from concepts::OutputOperator.
◆ reportOutput_()
|
private |
Can report the current convergence behaviour if requested via setReport()
- Parameters
-
K key of current cell int termination type coming from alglib report system
◆ sign_()
|
private |
◆ Wrapper_To_Call_Fun_()
|
staticprivate |
◆ Wrapper_To_Call_Grad_()
|
staticprivate |
Member Data Documentation
◆ curFunc_
|
private |
Definition at line 101 of file extrema.hh.
◆ elm_
|
private |
Definition at line 95 of file extrema.hh.
◆ extrema_
|
private |
Definition at line 87 of file extrema.hh.
◆ frm_
|
private |
Definition at line 91 of file extrema.hh.
◆ frmGrad_
|
private |
Definition at line 93 of file extrema.hh.
◆ np_
|
private |
Definition at line 97 of file extrema.hh.
◆ points_
|
private |
Definition at line 85 of file extrema.hh.
◆ pt2Object
|
static |
Inner static pointer to object, used by the wrapper.
Definition at line 76 of file extrema.hh.
◆ report_
|
private |
Definition at line 99 of file extrema.hh.
◆ spc_
|
private |
Definition at line 89 of file extrema.hh.
◆ vals_
|
private |
Definition at line 103 of file extrema.hh.
The documentation for this class was generated from the following file:
- hp2D/extrema.hh