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

函数

int compare_exact_nodes (const NumberNode &left, const NumberNode &right)
int compare_exact_to_rational (const NumberNode &left, const Rational &right)
template<typename Number>
int compare_values (const Number &left, const Number &right)

函数说明

◆ compare_exact_nodes()

int LMCAS::anonymous_namespace{symbolic_number_order.cpp}::compare_exact_nodes ( const NumberNode & left,
const NumberNode & right )

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

24 {
25 if (const auto* rational = std::get_if<Rational>(&right.value())) {
27 }
28 if (const auto* rational = std::get_if<Rational>(&left.value())) {
30 }
31 return compare_values(std::get<BigInt>(left.value()), std::get<BigInt>(right.value()));
32}
const std::variant< BigInt, Rational > & value() const noexcept
int compare_values(const Number &left, const Number &right)
int compare_exact_to_rational(const NumberNode &left, const Rational &right)
const ExprPtr & right
ExprResult rational(const Rational &value)

引用了 compare_exact_nodes(), compare_exact_to_rational(), compare_values(), LMCAS::rational(), LMCAS::right , 以及 LMCAS::NumberNode::value().

被这些函数引用 compare_exact_nodes().

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

◆ compare_exact_to_rational()

int LMCAS::anonymous_namespace{symbolic_number_order.cpp}::compare_exact_to_rational ( const NumberNode & left,
const Rational & right )

在文件 symbolic_number_order.cpp 第 17 行定义.

17 {
18 if (const auto* rational = std::get_if<Rational>(&left.value())) {
20 }
21 return compare_values(Rational(std::get<BigInt>(left.value())), right);
22}

引用了 compare_exact_to_rational(), compare_values(), LMCAS::rational(), LMCAS::right , 以及 LMCAS::NumberNode::value().

被这些函数引用 compare_exact_nodes() , 以及 compare_exact_to_rational().

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

◆ compare_values()

template<typename Number>
int LMCAS::anonymous_namespace{symbolic_number_order.cpp}::compare_values ( const Number & left,
const Number & right )

在文件 symbolic_number_order.cpp 第 7 行定义.

7 {
8 if (left < right) {
9 return -1;
10 }
11 if (left == right) {
12 return 0;
13 }
14 return 1;
15}

引用了 compare_values() , 以及 LMCAS::right.

被这些函数引用 compare_exact_nodes(), compare_exact_to_rational() , 以及 compare_values().

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