LMCAS
Lamina Computer Algebra System
载入中...
搜索中...
未找到
LMCAS::anonymous_namespace{normalization_numeric_functions.cpp} 命名空间参考

函数

std::shared_ptr< const SymbolicNode > function_at_zero (FunctionNode::FuncType type)
bool number_equals_integer (const std::shared_ptr< const NumberNode > &number, const BigInt &value)
std::shared_ptr< const SymbolicNode > numeric_absolute (const NumberNode &number)
std::shared_ptr< const SymbolicNode > numeric_lambert_w (const std::shared_ptr< const NumberNode > &number)
std::shared_ptr< const SymbolicNode > numeric_square_root (const std::shared_ptr< const NumberNode > &number, detail::RewriteBudget *budget)

函数说明

◆ function_at_zero()

std::shared_ptr< const SymbolicNode > LMCAS::anonymous_namespace{normalization_numeric_functions.cpp}::function_at_zero ( FunctionNode::FuncType type)

在文件 normalization_numeric_functions.cpp 第 11 行定义.

11 {
12 switch (type) {
15 return detail::make_node<NumberNode>(BigInt(0));
18 return detail::make_node<NumberNode>(BigInt(1));
19 default:
20 return nullptr;
21 }
22}
std::shared_ptr< const Node > make_node(Args &&... args)

引用了 LMCAS::FunctionNode::Cos, LMCAS::FunctionNode::Exp, function_at_zero(), LMCAS::detail::make_node(), LMCAS::FunctionNode::Sin , 以及 LMCAS::FunctionNode::Tan.

被这些函数引用 function_at_zero().

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

◆ number_equals_integer()

bool LMCAS::anonymous_namespace{normalization_numeric_functions.cpp}::number_equals_integer ( const std::shared_ptr< const NumberNode > & number,
const BigInt & value )

在文件 normalization_numeric_functions.cpp 第 5 行定义.

6 {
7 BigInt integer;
8 return try_get_integer_value(number, integer) && integer == value;
9}
ExprResult integer(Integer)=delete
bool try_get_integer_value(const std::shared_ptr< const NumberNode > &node, BigInt &value)
const std::string const ExprPtr & value

引用了 LMCAS::integer, number_equals_integer(), LMCAS::try_get_integer_value() , 以及 LMCAS::value.

被这些函数引用 number_equals_integer() , 以及 numeric_lambert_w().

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

◆ numeric_absolute()

std::shared_ptr< const SymbolicNode > LMCAS::anonymous_namespace{normalization_numeric_functions.cpp}::numeric_absolute ( const NumberNode & number)

在文件 normalization_numeric_functions.cpp 第 24 行定义.

24 {
25 if (const auto* integer = std::get_if<BigInt>(&number.value())) {
27 }
28 const auto& rational = std::get<Rational>(number.value());
29 if (rational.get_numerator().is_negative()) {
30 return detail::make_node<NumberNode>(Rational(
31 rational.get_numerator().abs(), rational.get_denominator()));
32 }
34}
const std::variant< BigInt, Rational > & value() const noexcept
ExprResult rational(const Rational &value)

引用了 LMCAS::integer, LMCAS::detail::make_node(), numeric_absolute(), LMCAS::rational() , 以及 LMCAS::NumberNode::value().

被这些函数引用 numeric_absolute().

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

◆ numeric_lambert_w()

std::shared_ptr< const SymbolicNode > LMCAS::anonymous_namespace{normalization_numeric_functions.cpp}::numeric_lambert_w ( const std::shared_ptr< const NumberNode > & number)

在文件 normalization_numeric_functions.cpp 第 46 行定义.

47 {
48 if (number_equals_integer(number, BigInt(0))) {
49 return detail::make_node<NumberNode>(BigInt(0));
50 }
51 return nullptr;
52}
bool number_equals_integer(const std::shared_ptr< const NumberNode > &number, const BigInt &value)

引用了 LMCAS::detail::make_node(), number_equals_integer() , 以及 numeric_lambert_w().

被这些函数引用 numeric_lambert_w().

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

◆ numeric_square_root()

std::shared_ptr< const SymbolicNode > LMCAS::anonymous_namespace{normalization_numeric_functions.cpp}::numeric_square_root ( const std::shared_ptr< const NumberNode > & number,
detail::RewriteBudget * budget )

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

37 {
38 if (auto root = normalization_exact_square_root(*number)) {
39 return root;
40 }
41 normalization_check_children(budget, 1, number);
43 std::vector<std::shared_ptr<const SymbolicNode>>{number});
44}
@ Sqrt
对数、绝对值、平方根。
std::shared_ptr< const NumberNode > normalization_exact_square_root(const NumberNode &number)
void normalization_check_children(detail::RewriteBudget *budget, std::size_t roots, const std::shared_ptr< const Nodes > &... children)

引用了 LMCAS::detail::make_node(), LMCAS::normalization_check_children(), LMCAS::normalization_exact_square_root(), numeric_square_root() , 以及 LMCAS::FunctionNode::Sqrt.

被这些函数引用 numeric_square_root().

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