LMCAS
Lamina Computer Algebra System
载入中...
搜索中...
未找到
LMCAS::detail::NumericEvaluator类 参考

#include </home/runner/work/docs/docs/LMCAS/src/internal/numeric_evaluation_support.hpp>

LMCAS::detail::NumericEvaluator 的协作图:

Public 成员函数

 NumericEvaluator (const NumericBindings &bindings, ComputationContext &context)
Result< ApproxReal > evaluate (const std::shared_ptr< const SymbolicNode > &node)

Private 成员函数

Result< ApproxReal > atan2 (const FunctionNode &node)
Result< ApproxReal > extremum (const FunctionNode &node)
Result< ApproxReal > function (const FunctionNode &node)
Result< ApproxReal > norm (const std::array< const PowerNode *, 2 > &squares)
Result< ApproxReal > number (const NumberNode &node)
Result< ApproxReal > power (const PowerNode &node)
Result< ApproxReal > product (const MultiplyNode &node)
Result< ApproxReal > root (const std::shared_ptr< const SymbolicNode > &node)
Result< ApproxReal > square_root (const NumberNode &node)
Result< ApproxReal > sum (const AddNode &node)
Result< ApproxReal > variable (const VariableNode &node)

Private 属性

const NumericBindings & bindings_
ComputationContext & context_

详细描述

在文件 numeric_evaluation_support.hpp 第 13 行定义.

构造及析构函数说明

◆ NumericEvaluator()

LMCAS::detail::NumericEvaluator::NumericEvaluator ( const NumericBindings & bindings,
ComputationContext & context )
inline

在文件 numeric_evaluation_support.hpp 第 15 行定义.

std::size_t std::size_t ComputationContext & context
const std::vector< Binding > & bindings

引用了 LMCAS::bindings, bindings_, LMCAS::detail::context , 以及 context_.

成员函数说明

◆ atan2()

Result< ApproxReal > LMCAS::detail::NumericEvaluator::atan2 ( const FunctionNode & node)
private

在文件 numeric_evaluation_nodes.cpp 第 131 行定义.

131 {
132 if (node.arguments().size() != 2) {
133 return numeric_failure(CasErrc::InvalidArgument, "atan2 requires two arguments");
134 }
135 auto y = evaluate(node.arguments()[0]);
136 if (!y) return y;
137 auto x = evaluate(node.arguments()[1]);
138 if (!x) return x;
139 return numeric_approximation(std::atan2(y.value().value, x.value().value));
140}
Result< ApproxReal > evaluate(const std::shared_ptr< const SymbolicNode > &node)
const SymbolicNodePtr & node(const ::LMCAS::SymbolicExpr &expression) noexcept
Result< ApproxReal > numeric_failure(CasErrc code, std::string message)
Result< ApproxReal > numeric_approximation(double value)

引用了 evaluate(), LMCAS::InvalidArgument, LMCAS::detail::node(), LMCAS::detail::numeric_approximation() , 以及 LMCAS::detail::numeric_failure().

被这些函数引用 function().

函数调用图:
这是这个函数的调用关系图:

◆ evaluate()

Result< ApproxReal > LMCAS::detail::NumericEvaluator::evaluate ( const std::shared_ptr< const SymbolicNode > & node)

在文件 numeric_evaluation.cpp 第 36 行定义.

36 {
37 auto entered = context_.enter_recursion(kOperation);
38 if (!entered) {
39 return Result<ApproxReal>::failure(entered.error());
40 }
41 RecursionScope scope(context_);
42 if (!node) {
43 return numeric_failure(CasErrc::InvalidArgument, "expression contains a null node");
44 }
45 if (const auto* value = dynamic_cast<const NumberNode*>(node.get())) {
46 return number(*value);
47 }
48 if (const auto* value = dynamic_cast<const VariableNode*>(node.get())) {
49 return variable(*value);
50 }
51 if (const auto* value = dynamic_cast<const AddNode*>(node.get())) {
52 return sum(*value);
53 }
54 if (const auto* value = dynamic_cast<const MultiplyNode*>(node.get())) {
55 return product(*value);
56 }
57 const auto squares = squared_norm_terms(*node);
58 if (squares[0]) {
59 return norm(squares);
60 }
61 if (const auto* value = dynamic_cast<const PowerNode*>(node.get())) {
62 return power(*value);
63 }
64 if (dynamic_cast<const RootOfNode*>(node.get())) {
65 return root(node);
66 }
67 if (const auto* value = dynamic_cast<const FunctionNode*>(node.get())) {
68 return function(*value);
69 }
71 "expression node is not real-numerically evaluable");
72}
Result< void > enter_recursion(const std::string &operation={})
static Result failure(CasErrc code, std::string message, std::string operation={})
Result< ApproxReal > variable(const VariableNode &node)
Result< ApproxReal > sum(const AddNode &node)
Result< ApproxReal > norm(const std::array< const PowerNode *, 2 > &squares)
Result< ApproxReal > number(const NumberNode &node)
Result< ApproxReal > function(const FunctionNode &node)
Result< ApproxReal > root(const std::shared_ptr< const SymbolicNode > &node)
Result< ApproxReal > power(const PowerNode &node)
Result< ApproxReal > product(const MultiplyNode &node)
std::array< const PowerNode *, 2 > squared_norm_terms(const SymbolicNode &root)
Recognize real-numeric norm forms without evaluating their squares.
const std::string const ExprPtr & value

引用了 context_, LMCAS::ComputationContext::enter_recursion(), LMCAS::Result< T >::failure(), function(), LMCAS::InvalidArgument, LMCAS::detail::node(), norm(), number(), LMCAS::detail::numeric_failure(), power(), product(), root(), LMCAS::detail::squared_norm_terms(), sum(), LMCAS::UnsupportedExpression, LMCAS::value , 以及 variable().

被这些函数引用 atan2(), LMCAS::evaluate_numeric(), extremum(), function(), norm(), power(), product() , 以及 sum().

函数调用图:
这是这个函数的调用关系图:

◆ extremum()

Result< ApproxReal > LMCAS::detail::NumericEvaluator::extremum ( const FunctionNode & node)
private

在文件 numeric_evaluation_nodes.cpp 第 142 行定义.

142 {
143 if (node.arguments().empty()) {
144 return numeric_failure(CasErrc::InvalidArgument, "min/max requires an argument");
145 }
146 auto first = evaluate(node.arguments().front());
147 if (!first) return first;
148 double value = first.value().value;
149 for (std::size_t i = 1; i < node.arguments().size(); ++i) {
150 auto next = evaluate(node.arguments()[i]);
151 if (!next) return next;
153 ? std::max(value, next.value().value)
154 : std::min(value, next.value().value);
155 }
157}
@ Max
最大值 max(a, b)。

引用了 evaluate(), LMCAS::InvalidArgument, LMCAS::FunctionNode::Max, LMCAS::detail::node(), LMCAS::detail::numeric_approximation(), LMCAS::detail::numeric_failure() , 以及 LMCAS::value.

被这些函数引用 function().

函数调用图:
这是这个函数的调用关系图:

◆ function()

Result< ApproxReal > LMCAS::detail::NumericEvaluator::function ( const FunctionNode & node)
private

在文件 numeric_evaluation.cpp 第 74 行定义.

74 {
75 if (node.type() == FunctionNode::FuncType::Infinity && node.arguments().empty()) {
76 return Result<ApproxReal>::success(ApproxReal{
77 std::numeric_limits<double>::infinity(), 0.0, NumericStatus::PositiveInfinity});
78 }
79 if (node.type() == FunctionNode::FuncType::Atan2) {
80 return atan2(node);
81 }
83 return extremum(node);
84 }
85 if (node.type() == FunctionNode::FuncType::Log &&
86 node.arguments().size() == 2) {
87 auto value = evaluate(node.arguments()[0]);
88 if (!value) {
89 return value;
90 }
91 auto base = evaluate(node.arguments()[1]);
92 if (!base) {
93 return base;
94 }
95 const double numeric_value = value.value().value;
96 const double numeric_base = base.value().value;
97 if (!(numeric_value > 0.0)) {
98 return numeric_failure(
100 "logarithm requires a positive real argument");
101 }
102 if (!(numeric_base > 0.0) || numeric_base == 1.0) {
103 return numeric_failure(
105 "logarithm base must be positive and not equal to one");
106 }
108 std::log(numeric_value) / std::log(numeric_base));
109 }
110 if (node.arguments().size() != 1) {
112 "function is not supported by real numeric evaluation");
113 }
114 if (node.type() == FunctionNode::FuncType::Sqrt) {
115 if (const auto* value = dynamic_cast<const NumberNode*>(node.arguments()[0].get())) {
116 return square_root(*value);
117 }
118 }
119 auto argument = evaluate(node.arguments()[0]);
120 if (!argument) {
121 return argument;
122 }
123 return evaluate_unary_numeric(node.type(), argument.value().value);
124}
@ Atan2
双参数反正切。
@ Min
最小值 min(a, b)。
@ Sqrt
对数、绝对值、平方根。
static Result success(T value)
Result< ApproxReal > extremum(const FunctionNode &node)
Result< ApproxReal > atan2(const FunctionNode &node)
Result< ApproxReal > square_root(const NumberNode &node)
Result< ApproxReal > evaluate_unary_numeric(FunctionNode::FuncType type, double value)

引用了 LMCAS::FunctionNode::Atan2, atan2(), LMCAS::DomainError, evaluate(), LMCAS::detail::evaluate_unary_numeric(), extremum(), LMCAS::FunctionNode::Infinity, LMCAS::FunctionNode::Log, LMCAS::FunctionNode::Max, LMCAS::FunctionNode::Min, LMCAS::detail::node(), LMCAS::detail::numeric_approximation(), LMCAS::detail::numeric_failure(), LMCAS::PositiveInfinity, LMCAS::FunctionNode::Sqrt, square_root(), LMCAS::Result< T >::success(), LMCAS::UnsupportedExpression , 以及 LMCAS::value.

被这些函数引用 evaluate().

函数调用图:
这是这个函数的调用关系图:

◆ norm()

Result< ApproxReal > LMCAS::detail::NumericEvaluator::norm ( const std::array< const PowerNode *, 2 > & squares)
private

在文件 numeric_evaluation_nodes.cpp 第 159 行定义.

159 {
160 auto first = evaluate(squares[0]->base());
161 if (!first) return first;
162 if (!squares[1]) return numeric_approximation(std::abs(first.value().value));
163 auto second = evaluate(squares[1]->base());
164 if (!second) return second;
165 return numeric_approximation(std::hypot(first.value().value, second.value().value));
166}

引用了 evaluate() , 以及 LMCAS::detail::numeric_approximation().

被这些函数引用 evaluate().

函数调用图:
这是这个函数的调用关系图:

◆ number()

Result< ApproxReal > LMCAS::detail::NumericEvaluator::number ( const NumberNode & node)
private

在文件 numeric_evaluation_nodes.cpp 第 8 行定义.

8 {
9 double value = 0.0;
10 try {
11 if (std::holds_alternative<BigInt>(node.value())) {
12 value = std::get<BigInt>(node.value()).to_double();
13 } else {
14 value = std::get<Rational>(node.value()).to_double();
15 }
16 } catch (const std::exception& error) {
17 return numeric_failure(CasErrc::NumericFailure, error.what());
18 }
19 if (!std::isfinite(value)) {
21 "exact number cannot be represented as a finite double");
22 }
24}

引用了 LMCAS::detail::node(), LMCAS::detail::numeric_approximation(), LMCAS::detail::numeric_failure(), LMCAS::NumericFailure , 以及 LMCAS::value.

被这些函数引用 evaluate() , 以及 product().

函数调用图:
这是这个函数的调用关系图:

◆ power()

Result< ApproxReal > LMCAS::detail::NumericEvaluator::power ( const PowerNode & node)
private

在文件 numeric_evaluation_power.cpp 第 71 行定义.

71 {
72 const auto* base_number = dynamic_cast<const NumberNode*>(node.base().get());
73 const auto* exponent_number = dynamic_cast<const NumberNode*>(node.exponent().get());
74 if (base_number && exponent_number) {
75 const auto* exponent = std::get_if<Rational>(&exponent_number->value());
76 if (exponent && *exponent == Rational(1, 2)) {
77 auto step = context_.consume_steps(1, "evaluate_numeric");
78 if (!step) return Result<ApproxReal>::failure(step.error());
79 return square_root(*base_number);
80 }
81 if (exponent_number->is_negative_one()) {
82 auto step = context_.consume_steps(2, "evaluate_numeric");
83 if (!step) return Result<ApproxReal>::failure(step.error());
84 if (base_number->is_zero()) {
85 return numeric_failure(CasErrc::DomainError, "zero cannot be raised to a non-positive power");
86 }
87 try {
88 if (const auto* integer = std::get_if<BigInt>(&base_number->value())) {
89 return numeric_approximation(Rational(BigInt(1), *integer).to_double());
90 }
91 const auto& rational = std::get<Rational>(base_number->value());
93 Rational(rational.get_denominator(), rational.get_numerator()).to_double());
94 } catch (const std::range_error& error) {
95 return numeric_failure(CasErrc::NumericFailure, error.what());
96 } catch (const std::overflow_error& error) {
97 return numeric_failure(CasErrc::NumericFailure, error.what());
98 } catch (const std::underflow_error& error) {
99 return numeric_failure(CasErrc::NumericFailure, error.what());
100 }
101 }
102 }
103 auto base = evaluate(node.base());
104 if (!base) {
105 return base;
106 }
107 auto exponent = evaluate(node.exponent());
108 if (!exponent) {
109 return exponent;
110 }
111 const double base_value = base.value().value;
112 const double exponent_value = exponent.value().value;
113 if (base_value == 0.0 && exponent_value <= 0.0) {
114 return numeric_failure(CasErrc::DomainError, "zero cannot be raised to a non-positive power");
115 }
116 if (std::signbit(base_value) && std::isfinite(exponent_value)) {
117 const auto parity = exponent_parity(node, exponent_value);
118 if (base_value < 0.0 && std::isfinite(base_value) && !parity.integral) {
120 "a negative real base requires an integer exponent");
121 }
122 if (parity.integral) {
123 const double magnitude = std::pow(std::abs(base_value), exponent_value);
124 if (magnitude == 0.0 && base_value != 0.0) {
125 return numeric_failure(CasErrc::NumericFailure, "numeric power underflow");
126 }
127 return numeric_approximation(parity.odd ? -magnitude : magnitude);
128 }
129 }
130 const double value = std::pow(base_value, exponent_value);
131 if (value == 0.0 && base_value != 0.0) {
132 return numeric_failure(CasErrc::NumericFailure, "numeric power underflow");
133 }
135}
Result< void > consume_steps(std::size_t amount=1, const std::string &operation={})
ExponentParity exponent_parity(const PowerNode &power, double value)
ExprResult integer(Integer)=delete
@ Rational
Rational numbers
const ExprPtr & exponent
ExprResult rational(const Rational &value)

引用了 LMCAS::ComputationContext::consume_steps(), context_, LMCAS::DomainError, evaluate(), LMCAS::exponent, LMCAS::Result< T >::failure(), LMCAS::integer, LMCAS::detail::node(), LMCAS::detail::numeric_approximation(), LMCAS::detail::numeric_failure(), LMCAS::NumericFailure, LMCAS::rational(), square_root() , 以及 LMCAS::value.

被这些函数引用 evaluate() , 以及 product().

函数调用图:
这是这个函数的调用关系图:

◆ product()

Result< ApproxReal > LMCAS::detail::NumericEvaluator::product ( const MultiplyNode & node)
private

在文件 numeric_evaluation_nodes.cpp 第 67 行定义.

67 {
68 const bool exact_constants = std::all_of(node.operands().begin(), node.operands().end(),
69 [](const auto& operand) {
70 if (dynamic_cast<const NumberNode*>(operand.get())) return true;
71 const auto* power = dynamic_cast<const PowerNode*>(operand.get());
72 const auto* exponent = power
73 ? dynamic_cast<const NumberNode*>(power->exponent().get()) : nullptr;
74 return exponent && exponent->is_negative_one() &&
75 dynamic_cast<const NumberNode*>(power->base().get());
76 });
77 if (exact_constants) {
78 Rational value(1);
79 for (const auto& operand : node.operands()) {
80 const auto* power = dynamic_cast<const PowerNode*>(operand.get());
81 const auto* number = dynamic_cast<const NumberNode*>(
82 power ? power->base().get() : operand.get());
83 auto step = context_.consume_steps(power ? 3 : 1, "evaluate_numeric");
84 if (!step) return Result<ApproxReal>::failure(step.error());
85 Rational factor = std::holds_alternative<BigInt>(number->value())
86 ? Rational(std::get<BigInt>(number->value()))
87 : std::get<Rational>(number->value());
88 if (power) {
89 if (factor.is_zero()) {
90 return numeric_failure(CasErrc::DomainError, "zero cannot be raised to a non-positive power");
91 }
92 factor = Rational(factor.get_denominator(), factor.get_numerator());
93 }
94 value = value * factor;
95 auto numerator_bits = context_.require_integer_bits(
96 value.get_numerator().bit_length(), "evaluate_numeric");
97 if (!numerator_bits) return Result<ApproxReal>::failure(numerator_bits.error());
98 auto denominator_bits = context_.require_integer_bits(
99 value.get_denominator().bit_length(), "evaluate_numeric");
100 if (!denominator_bits) return Result<ApproxReal>::failure(denominator_bits.error());
101 }
102 try {
103 return numeric_approximation(value.to_double());
104 } catch (const std::exception& error) {
105 return numeric_failure(CasErrc::NumericFailure, error.what());
106 }
107 }
108 double value = 1.0;
109 bool infinite = false;
110 for (const auto& operand : node.operands()) {
111 auto evaluated = evaluate(operand);
112 if (!evaluated) return evaluated;
113 const double factor = evaluated.value().value;
114 const double multiplied = value * factor;
115 if (multiplied == 0.0 && value != 0.0 && factor != 0.0) {
116 return numeric_failure(CasErrc::NumericFailure, "numeric multiplication underflow");
117 }
118 value = multiplied;
119 infinite = infinite || !evaluated.value().is_finite();
120 if (std::isinf(value) && !infinite) {
121 return numeric_failure(CasErrc::NumericFailure, "numeric evaluation produced a nonfinite result");
122 }
123 }
124 if (std::isinf(value) && infinite) {
125 return Result<ApproxReal>::success(ApproxReal{
127 }
129}
Result< void > require_integer_bits(std::size_t amount, const std::string &operation={}) const

引用了 LMCAS::ComputationContext::consume_steps(), context_, LMCAS::DomainError, evaluate(), LMCAS::Result< T >::failure(), LMCAS::NegativeInfinity, LMCAS::detail::node(), number(), LMCAS::detail::numeric_approximation(), LMCAS::detail::numeric_failure(), LMCAS::NumericFailure, LMCAS::PositiveInfinity, power(), LMCAS::ComputationContext::require_integer_bits(), LMCAS::Result< T >::success() , 以及 LMCAS::value.

被这些函数引用 evaluate().

函数调用图:
这是这个函数的调用关系图:

◆ root()

Result< ApproxReal > LMCAS::detail::NumericEvaluator::root ( const std::shared_ptr< const SymbolicNode > & node)
private

在文件 numeric_evaluation_nodes.cpp 第 168 行定义.

168 {
169 auto root_expression = LMCAS::detail::make_expression_ptr(node);
170 auto root = rootof_evaluate_checked(root_expression, context_);
171 if (!root) return Result<ApproxReal>::failure(root.error());
172 return numeric_approximation(root.value());
173}
std::shared_ptr<::LMCAS::SymbolicExpr > make_expression_ptr(SymbolicNodePtr root)
RootOfEvaluationResult rootof_evaluate_checked(const std::shared_ptr< SymbolicExpr > &rootof_expr, ComputationContext &context)

引用了 context_, LMCAS::Result< T >::failure(), LMCAS::detail::make_expression_ptr(), LMCAS::detail::node(), LMCAS::detail::numeric_approximation(), root() , 以及 LMCAS::rootof_evaluate_checked().

被这些函数引用 evaluate() , 以及 root().

函数调用图:
这是这个函数的调用关系图:

◆ square_root()

Result< ApproxReal > LMCAS::detail::NumericEvaluator::square_root ( const NumberNode & node)
private

在文件 numeric_evaluation_power.cpp 第 31 行定义.

31 {
32 auto step = context_.consume_steps(1, "evaluate_numeric");
33 if (!step) return Result<ApproxReal>::failure(step.error());
34 if (node.is_zero()) return numeric_approximation(0.0);
35 BigInt numerator;
36 BigInt denominator(1);
37 if (const auto* integer = std::get_if<BigInt>(&node.value())) {
38 numerator = *integer;
39 } else {
40 const auto& rational = std::get<Rational>(node.value());
41 numerator = rational.get_numerator();
42 denominator = rational.get_denominator();
43 }
44 if (numerator.is_negative()) {
46 "real square root requires a non-negative argument");
47 }
48 const auto num_bits = numerator.bit_length();
49 const auto den_bits = denominator.bit_length();
50 auto bits = context_.require_integer_bits(std::max(num_bits, den_bits), "evaluate_numeric");
51 if (!bits) return Result<ApproxReal>::failure(bits.error());
52 const bool reciprocal_scale = num_bits < den_bits;
53 const auto difference = reciprocal_scale ? den_bits - num_bits : num_bits - den_bits;
54 constexpr int max_scale = 2 * std::numeric_limits<double>::max_exponent;
55 constexpr int min_scale = 2 * (std::numeric_limits<double>::digits -
56 std::numeric_limits<double>::min_exponent + 1);
57 if (difference > static_cast<std::size_t>(reciprocal_scale ? min_scale : max_scale)) {
58 return numeric_failure(CasErrc::NumericFailure, "numeric square root is outside the floating-point range");
59 }
60 const auto shift = difference - difference % 2;
61 if (reciprocal_scale) numerator <<= shift;
62 else denominator <<= shift;
63 const int scale = static_cast<int>(shift / 2) * (reciprocal_scale ? -1 : 1);
64 const double value = std::ldexp(std::sqrt(Rational(numerator, denominator).to_double()), scale);
65 if (value == 0.0) {
66 return numeric_failure(CasErrc::NumericFailure, "numeric square root underflow");
67 }
69}
const ExprPtr & denominator

引用了 LMCAS::ComputationContext::consume_steps(), context_, LMCAS::denominator, LMCAS::DomainError, LMCAS::Result< T >::failure(), LMCAS::integer, LMCAS::detail::node(), LMCAS::detail::numeric_approximation(), LMCAS::detail::numeric_failure(), LMCAS::NumericFailure, LMCAS::rational(), LMCAS::ComputationContext::require_integer_bits() , 以及 LMCAS::value.

被这些函数引用 function() , 以及 power().

函数调用图:
这是这个函数的调用关系图:

◆ sum()

Result< ApproxReal > LMCAS::detail::NumericEvaluator::sum ( const AddNode & node)
private

在文件 numeric_evaluation_nodes.cpp 第 48 行定义.

48 {
49 double value = 0.0;
50 bool infinite = false;
51 for (const auto& operand : node.operands()) {
52 auto evaluated = evaluate(operand);
53 if (!evaluated) return evaluated;
54 value += evaluated.value().value;
55 infinite = infinite || !evaluated.value().is_finite();
56 if (std::isinf(value) && !infinite) {
57 return numeric_failure(CasErrc::NumericFailure, "numeric evaluation produced a nonfinite result");
58 }
59 }
60 if (std::isinf(value) && infinite) {
61 return Result<ApproxReal>::success(ApproxReal{
63 }
65}

引用了 evaluate(), LMCAS::NegativeInfinity, LMCAS::detail::node(), LMCAS::detail::numeric_approximation(), LMCAS::detail::numeric_failure(), LMCAS::NumericFailure, LMCAS::PositiveInfinity, LMCAS::Result< T >::success() , 以及 LMCAS::value.

被这些函数引用 evaluate().

函数调用图:
这是这个函数的调用关系图:

◆ variable()

Result< ApproxReal > LMCAS::detail::NumericEvaluator::variable ( const VariableNode & node)
private

在文件 numeric_evaluation_nodes.cpp 第 26 行定义.

26 {
27 if (node.is_constant() && (node.name() == "pi" || node.name() == "π")) {
28 return numeric_approximation(static_cast<double>(LMMC_CONST_PI));
29 }
30 if (node.is_constant() && node.name() == "e") {
31 return numeric_approximation(std::exp(1.0));
32 }
33 if (node.is_constant() && node.name() == "phi") {
34 return numeric_approximation((1.0 + std::sqrt(5.0)) / 2.0);
35 }
36 auto it = bindings_.find(node.name());
37 if (it == bindings_.end()) {
39 "no numeric binding for symbol '" + node.name() + "'");
40 }
41 if (!std::isfinite(it->second)) {
42 return numeric_failure(CasErrc::NumericFailure, "numeric binding is not finite");
43 }
45 ApproxReal{it->second, 0.0, NumericStatus::Finite});
46}

引用了 bindings_, LMCAS::Finite, LMCAS::detail::node(), LMCAS::detail::numeric_approximation(), LMCAS::detail::numeric_failure(), LMCAS::NumericFailure, LMCAS::Result< T >::success() , 以及 LMCAS::UnboundSymbol.

被这些函数引用 evaluate().

函数调用图:
这是这个函数的调用关系图:

类成员变量说明

◆ bindings_

const NumericBindings& LMCAS::detail::NumericEvaluator::bindings_
private

在文件 numeric_evaluation_support.hpp 第 21 行定义.

被这些函数引用 NumericEvaluator() , 以及 variable().

◆ context_

ComputationContext& LMCAS::detail::NumericEvaluator::context_
private

在文件 numeric_evaluation_support.hpp 第 22 行定义.

被这些函数引用 NumericEvaluator(), evaluate(), power(), product(), root() , 以及 square_root().


该类的文档由以下文件生成: