Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
MathUtils_Bracket.hxx File Reference
#include <MathUtils_Core.hxx>
#include <algorithm>
#include <cmath>
#include <utility>

Data Structures

struct  MathUtils::BracketResult
 Result of root bracketing operation. More...
struct  MathUtils::MinBracketResult
 Result of minimum bracketing operation. More...
struct  MathUtils::MinBracketOptions
 Options for minimum bracketing. More...

Namespaces

namespace  MathUtils
 Modern math solver types and result structures.
namespace  MathUtils::detail

Functions

template<typename Function>
BracketResult MathUtils::BracketRoot (Function &theFunc, double theA, double theB, int theMaxIter=50)
 Bracket a root by expanding interval until sign change is found. Starting from [theA, theB], expands outward using golden ratio.
double MathUtils::detail::Limited (double theValue, const MinBracketOptions &theOptions)
template<typename Function>
bool MathUtils::detail::LimitAndMayBeSwap (Function &theFunc, const MinBracketOptions &theOptions, const double theA, double &theB, double &theFB, double &theC, double &theFC)
template<typename Function>
MinBracketResult MathUtils::BracketMinimum (Function &theFunc, double theA, double theB, const MinBracketOptions &theOptions=MinBracketOptions())
 Bracket a minimum by finding three points a < b < c with f(b) < f(a) and f(b) < f(c). Uses golden section expansion with parabolic interpolation.
template<typename Function>
MinBracketResult MathUtils::BracketMinimum (Function &theFunc, double theA, double theB, int theMaxIter)
 Backward-compatible convenience overload with only max-iterations argument.