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

函数

detail::SymbolicNodePtr discardable_zero_factor (const std::vector< detail::SymbolicNodePtr > &operands, detail::RewriteBudget *budget)

函数说明

◆ discardable_zero_factor()

detail::SymbolicNodePtr LMCAS::anonymous_namespace{symbolic_factory.cpp}::discardable_zero_factor ( const std::vector< detail::SymbolicNodePtr > & operands,
detail::RewriteBudget * budget )

在文件 symbolic_factory.cpp 第 64 行定义.

65 {
66 const auto zero = std::find_if(operands.begin(), operands.end(), [](const auto& operand) {
67 return operand->is_zero();
68 });
69 if (zero == operands.end()) { return nullptr; }
70 std::optional<ComputationContext> local_context;
71 if (!budget) { local_context.emplace(); }
72 auto& context = budget ? budget->context() : *local_context;
73 if (std::all_of(operands.begin(), operands.end(), [&](const auto& operand) {
74 return normalization_can_discard(operand, detail::no_facts(), Domain::Real, context);
75 })) {
76 return *zero;
77 }
78 return nullptr;
79}
ComputationContext & context() const noexcept
const std::vector< Polynomial< BigInt > > const BigInt ComputationContext & context

引用了 LMCAS::context, LMCAS::detail::RewriteBudget::context() , 以及 discardable_zero_factor().

被这些函数引用 discardable_zero_factor().

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