Doxygen
1.9.1
|
Classes | |
struct | TasGrid::Optimizer::OptimizerResult |
Simple pair of numbers for the node and the value of the functional at the node. More... | |
struct | TasGrid::Optimizer::CurrentNodes< TypeOneDRule > |
Data needed for the functional associated with the sequence rule, specialized for each case. More... | |
struct | TasGrid::Optimizer::CurrentNodes< rule_leja > |
Specialization for rule_leja, no need for coefficients. More... | |
struct | TasGrid::Optimizer::CurrentNodes< rule_mindeltaodd > |
Specialization for rule_mindeltaodd, requires two levels. More... | |
struct | TasGrid::Optimizer::HasDerivative< rule > |
Indicates whether a rule has associated derivative, most do. More... | |
struct | TasGrid::Optimizer::HasDerivative< rule_minlebesgue > |
Specialization for rule_minlebesgue which uses a min-max problem and cannot be differentiated. More... | |
struct | TasGrid::Optimizer::HasDerivative< rule_mindelta > |
Specialization for rule_mindelta which uses a min-max problem and cannot be differentiated. More... | |
Functions | |
template<TypeOneDRule rule> | |
double | TasGrid::Optimizer::getNextNode (std::vector< double > const &nodes) |
For the given rule and set of nodes, compute the next node using the greedy procedure. | |
std::vector< double > | TasGrid::Optimizer::getPrecomputedMinLebesgueNodes () |
Get the hard-coded pre-computed nodes. More... | |
std::vector< double > | TasGrid::Optimizer::getPrecomputedMinDeltaNodes () |
Get the hard-coded pre-computed nodes. More... | |
template<TypeOneDRule rule> | |
std::vector< double > | TasGrid::Optimizer::getGreedyNodes (int n) |
Get n nodes for the given sequence rule, either compute or use pre-computed. | |
std::vector< double > | TasGrid::Optimizer::makeCoefficients (std::vector< double > const &nodes) |
Computes the coefficients needed for fast evaluation of the Lagrange polynomials. | |
std::vector< double > | TasGrid::Optimizer::evalLagrange (std::vector< double > const &nodes, std::vector< double > const &coeffs, double x) |
Computes the values of the Lagrange polynomials at x, used in most functionals. | |
double | TasGrid::Optimizer::differentiateBasis (std::vector< double > const &nodes, std::vector< double > const &coeffs, size_t inode, double x) |
Computes the derivative of the inode basis functions at x. | |
template<TypeOneDRule rule> | |
double | TasGrid::Optimizer::getValue (CurrentNodes< rule > const &, double) |
Computes the value of the functional for given x, specialized for each sequence. | |
template<TypeOneDRule rule> | |
double | TasGrid::Optimizer::getDerivative (CurrentNodes< rule > const &, double) |
Computes the derivative of the functional for given x, specialized for each sequence with HasDerivative<rule>::value = true. | |
template<TypeOneDRule rule> | |
OptimizerResult | TasGrid::Optimizer::performSecantSearch (CurrentNodes< rule > const ¤t, double left, double right) |
Uses the secant method to find local maximum of the functional of the current nodes, uses left and right as starting points. More... | |
template<TypeOneDRule rule> | |
OptimizerResult | TasGrid::Optimizer::computeLocalMaximum (CurrentNodes< rule > const ¤t, double left_node, double right_node) |
Finds the maximum of the functional of the current nodes in the interval between left_node and right_node. More... | |
template<TypeOneDRule rule> | |
OptimizerResult | TasGrid::Optimizer::computeMaximum (CurrentNodes< rule > const ¤t) |
Finds the maximum of the functional over the interval (-1, 1). More... | |
template<> | |
double | TasGrid::Optimizer::getValue< rule_leja > (CurrentNodes< rule_leja > const ¤t, double x) |
The rule_leja functional. | |
template<> | |
double | TasGrid::Optimizer::getValue< rule_maxlebesgue > (CurrentNodes< rule_maxlebesgue > const ¤t, double x) |
The rule_maxlebesgue functional. | |
template<> | |
double | TasGrid::Optimizer::getValue< rule_mindeltaodd > (CurrentNodes< rule_mindeltaodd > const ¤t, double x) |
The rule_mindeltaodd functional (indicates companion to rule_mindelta for the min-max problem). | |
template<> | |
double | TasGrid::Optimizer::getValue< rule_minlebesgue > (CurrentNodes< rule_minlebesgue > const ¤t, double x) |
The rule_minlebesgue functional, uses the rule_maxlebesgue functions in min-max problem. | |
template<> | |
double | TasGrid::Optimizer::getValue< rule_mindelta > (CurrentNodes< rule_mindelta > const ¤t, double x) |
The rule_mindelta functional, uses the rule_mindeltaodd functions in min-max problem. | |
template<> | |
double | TasGrid::Optimizer::getDerivative< rule_leja > (CurrentNodes< rule_leja > const ¤t, double x) |
The derivative of the rule_leja functional. | |
template<> | |
double | TasGrid::Optimizer::getDerivative< rule_maxlebesgue > (CurrentNodes< rule_maxlebesgue > const ¤t, double x) |
The derivative of the rule_maxlebesgue functional. | |
template<> | |
double | TasGrid::Optimizer::getDerivative< rule_mindeltaodd > (CurrentNodes< rule_mindeltaodd > const ¤t, double x) |
The derivative of the rule_mindeltaodd functional. | |
std::vector< double > TasGrid::Optimizer::getPrecomputedMinLebesgueNodes | ( | ) |
Get the hard-coded pre-computed nodes.
Some nodes are very expensive to compute, thus we store a pre-computed set that contains enough nodes for most applications.
std::vector< double > TasGrid::Optimizer::getPrecomputedMinDeltaNodes | ( | ) |
Get the hard-coded pre-computed nodes.
Some nodes are very expensive to compute, thus we store a pre-computed set that contains enough nodes for most applications.
OptimizerResult TasGrid::Optimizer::performSecantSearch | ( | CurrentNodes< rule > const & | current, |
double | left, | ||
double | right | ||
) |
Uses the secant method to find local maximum of the functional of the current nodes, uses left and right as starting points.
Uses the secant method to find the zero of the derivative of the functional associated with the rule. The method converges fast but may converge to the wrong answer if the initial guess is not close to the zero. When called from computeLocalMaximum(), the result of a coarse pattern search is used as initial guess.
OptimizerResult TasGrid::Optimizer::computeLocalMaximum | ( | CurrentNodes< rule > const & | current, |
double | left_node, | ||
double | right_node | ||
) |
Finds the maximum of the functional of the current nodes in the interval between left_node and right_node.
Uses pattern search with simple left, middle, and right points. If the functional of the rule is differentiable, then the pattern search is used as an initial guess to secant optimization method.
OptimizerResult TasGrid::Optimizer::computeMaximum | ( | CurrentNodes< rule > const & | current | ) |
Finds the maximum of the functional over the interval (-1, 1).
Given the current set of nodes, construct the functional for the given rule and perform a local optimization on every interval, i.e., compute the local maximum between every two adjacent nodes in current. The work in done in parallel and the global maximum is reported as the largest among the local maximums.