LMCAS
Lamina Computer Algebra System
Toggle main menu visibility
载入中...
搜索中...
未找到
numeric_evaluation_support.hpp
浏览该文件的文档.
1
#pragma once
2
3
#include "
numeric_evaluation.hpp
"
4
#include "
internal/symbolic_ast.hpp
"
5
#include <array>
6
7
namespace
LMCAS::detail
{
8
9
Result<ApproxReal>
numeric_failure
(
CasErrc
code, std::string message);
10
Result<ApproxReal>
numeric_approximation
(
double
value
);
11
Result<ApproxReal>
evaluate_unary_numeric
(
FunctionNode::FuncType
type,
double
value
);
12
13
class
NumericEvaluator
{
14
public
:
15
NumericEvaluator
(
const
NumericBindings
&
bindings
,
ComputationContext
&
context
)
16
:
bindings_
(
bindings
),
context_
(
context
) {}
17
18
Result<ApproxReal>
evaluate
(
const
std::shared_ptr<const SymbolicNode>&
node
);
19
20
private
:
21
const
NumericBindings
&
bindings_
;
22
ComputationContext
&
context_
;
23
24
Result<ApproxReal>
number
(
const
NumberNode
&
node
);
25
Result<ApproxReal>
variable
(
const
VariableNode
&
node
);
26
Result<ApproxReal>
sum
(
const
AddNode
&
node
);
27
Result<ApproxReal>
product
(
const
MultiplyNode
&
node
);
28
Result<ApproxReal>
norm
(
const
std::array<const PowerNode*, 2>& squares);
29
Result<ApproxReal>
power
(
const
PowerNode
&
node
);
30
Result<ApproxReal>
square_root
(
const
NumberNode
&
node
);
31
Result<ApproxReal>
function
(
const
FunctionNode
&
node
);
32
Result<ApproxReal>
atan2
(
const
FunctionNode
&
node
);
33
Result<ApproxReal>
extremum
(
const
FunctionNode
&
node
);
34
Result<ApproxReal>
root
(
const
std::shared_ptr<const SymbolicNode>&
node
);
35
};
36
37
}
LMCAS::AddNode
加法节点,表示多个操作数的求和。
定义
arithmetic.hpp:55
LMCAS::ComputationContext
定义
computation_context.hpp:99
LMCAS::FunctionNode
函数节点,表示数学函数调用(三角函数、对数、特殊函数等)。
定义
functions.hpp:10
LMCAS::FunctionNode::FuncType
FuncType
定义
functions.hpp:12
LMCAS::MultiplyNode
乘法节点,表示多个操作数的乘积。
定义
arithmetic.hpp:134
LMCAS::NumberNode
定义
numbers.hpp:8
LMCAS::PowerNode
幂运算节点,表示 base^exponent。
定义
arithmetic.hpp:218
LMCAS::Result
定义
result.hpp:39
LMCAS::VariableNode
变量节点,表示一个符号变量。
定义
arithmetic.hpp:10
LMCAS::detail::NumericEvaluator::variable
Result< ApproxReal > variable(const VariableNode &node)
定义
numeric_evaluation_nodes.cpp:26
LMCAS::detail::NumericEvaluator::sum
Result< ApproxReal > sum(const AddNode &node)
定义
numeric_evaluation_nodes.cpp:48
LMCAS::detail::NumericEvaluator::norm
Result< ApproxReal > norm(const std::array< const PowerNode *, 2 > &squares)
定义
numeric_evaluation_nodes.cpp:159
LMCAS::detail::NumericEvaluator::number
Result< ApproxReal > number(const NumberNode &node)
定义
numeric_evaluation_nodes.cpp:8
LMCAS::detail::NumericEvaluator::function
Result< ApproxReal > function(const FunctionNode &node)
定义
numeric_evaluation.cpp:74
LMCAS::detail::NumericEvaluator::extremum
Result< ApproxReal > extremum(const FunctionNode &node)
定义
numeric_evaluation_nodes.cpp:142
LMCAS::detail::NumericEvaluator::root
Result< ApproxReal > root(const std::shared_ptr< const SymbolicNode > &node)
定义
numeric_evaluation_nodes.cpp:168
LMCAS::detail::NumericEvaluator::atan2
Result< ApproxReal > atan2(const FunctionNode &node)
定义
numeric_evaluation_nodes.cpp:131
LMCAS::detail::NumericEvaluator::square_root
Result< ApproxReal > square_root(const NumberNode &node)
定义
numeric_evaluation_power.cpp:31
LMCAS::detail::NumericEvaluator::bindings_
const NumericBindings & bindings_
定义
numeric_evaluation_support.hpp:21
LMCAS::detail::NumericEvaluator::evaluate
Result< ApproxReal > evaluate(const std::shared_ptr< const SymbolicNode > &node)
定义
numeric_evaluation.cpp:36
LMCAS::detail::NumericEvaluator::context_
ComputationContext & context_
定义
numeric_evaluation_support.hpp:22
LMCAS::detail::NumericEvaluator::power
Result< ApproxReal > power(const PowerNode &node)
定义
numeric_evaluation_power.cpp:71
LMCAS::detail::NumericEvaluator::product
Result< ApproxReal > product(const MultiplyNode &node)
定义
numeric_evaluation_nodes.cpp:67
LMCAS::detail::NumericEvaluator::NumericEvaluator
NumericEvaluator(const NumericBindings &bindings, ComputationContext &context)
定义
numeric_evaluation_support.hpp:15
LMCAS::detail
多元 Hensel 提升(单变量步)
定义
assumption_context.hpp:31
LMCAS::detail::node
const SymbolicNodePtr & node(const ::LMCAS::SymbolicExpr &expression) noexcept
定义
base.hpp:91
LMCAS::detail::numeric_failure
Result< ApproxReal > numeric_failure(CasErrc code, std::string message)
定义
numeric_evaluation.cpp:24
LMCAS::detail::evaluate_unary_numeric
Result< ApproxReal > evaluate_unary_numeric(FunctionNode::FuncType type, double value)
定义
numeric_evaluation_functions.cpp:166
LMCAS::detail::numeric_approximation
Result< ApproxReal > numeric_approximation(double value)
定义
numeric_evaluation.cpp:28
LMCAS::detail::context
std::size_t std::size_t ComputationContext & context
定义
exact_algebraic.hpp:27
LMCAS::CasErrc
CasErrc
定义
result.hpp:12
LMCAS::bindings
const std::vector< Binding > & bindings
定义
expr.hpp:310
LMCAS::value
const std::string const ExprPtr & value
定义
expr.hpp:293
LMCAS::NumericBindings
std::unordered_map< std::string, double > NumericBindings
定义
numeric_evaluation.hpp:14
numeric_evaluation.hpp
symbolic_ast.hpp
内部 AST 定义。
src
internal
numeric_evaluation_support.hpp
生成于
, 为 LMCAS使用
1.18.0