|
PineForge HPO 0.1.0
Native hyperparameter optimization for PineForge strategies
|
Parsed metric expression that is compiled once and evaluated repeatedly. More...
#include <pineforge/hpo/objective.hpp>
Public Member Functions | |
| MetricExpression (std::string source) | |
Parses and compiles source. | |
| ~MetricExpression () | |
| MetricExpression (MetricExpression &&) noexcept | |
| MetricExpression & | operator= (MetricExpression &&) noexcept |
| MetricExpression (const MetricExpression &)=delete | |
| MetricExpression & | operator= (const MetricExpression &)=delete |
| ExpressionEvaluation | evaluate (const MetricMap &metrics, const EvaluationPolicy &policy={}) const noexcept |
| Evaluates the compiled expression without throwing. | |
| const std::string & | source () const noexcept |
| Returns the original expression text. | |
| const std::vector< std::string > & | identifiers () const noexcept |
| Returns unique metric identifiers in first-appearance order. | |
Parsed metric expression that is compiled once and evaluated repeatedly.
Supported syntax includes identifiers, finite numeric literals, +, -, *, /, unary signs, parentheses, min(a,b), max(a,b), abs(a), and comparisons. Comparisons yield 1.0 when true and 0.0 when false.
Definition at line 83 of file objective.hpp.
|
explicit |
Parses and compiles source.
| ExpressionError | when the source is empty or syntactically invalid. |
| pineforge::hpo::MetricExpression::~MetricExpression | ( | ) |
|
noexcept |
|
delete |
|
noexcept |
Evaluates the compiled expression without throwing.
Missing metrics and arithmetic-policy failures are returned in the result envelope.
|
inlinenoexcept |
Returns unique metric identifiers in first-appearance order.
Definition at line 103 of file objective.hpp.
|
delete |
|
noexcept |
|
inlinenoexcept |
Returns the original expression text.
Definition at line 101 of file objective.hpp.