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

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

LMCAS::detail::RewriteBudget 的协作图:

类

struct  Entry
class  Measurement
struct  Shape

Public 成员函数

 RewriteBudget (ComputationContext &context, std::size_t max_depth, std::size_t max_nodes, const char *operation)
 RewriteBudget (ComputationContext &context, std::size_t max_steps, std::size_t max_depth, std::size_t max_nodes, const char *operation)
 RewriteBudget (const RewriteBudget &)=delete
std::size_t append_size (std::size_t current, std::size_t child)
void consume ()
ComputationContext & context () const noexcept
void enter ()
void leave () noexcept
std::size_t max_nodes () const noexcept
std::size_t measure (const std::shared_ptr< const SymbolicNode > &node)
std::size_t measure_result (const std::shared_ptr< const SymbolicNode > &node)
RewriteBudget & operator= (const RewriteBudget &)=delete
void require_nodes (std::size_t nodes) const

静态 Public 成员函数

static std::size_t input_nodes (const std::shared_ptr< const SymbolicNode > &lhs, const std::shared_ptr< const SymbolicNode > &rhs, ComputationContext &context, std::size_t max_depth, const char *operation)

Private 成员函数

void check_step_access () const
void commit_step ()
Shape measure_shape (const std::shared_ptr< const SymbolicNode > &node, std::size_t path_depth, std::size_t active_depth)
void require_shape (const Shape &shape, std::size_t path_depth, std::size_t active_depth) const

Private 属性

ComputationContext & context_
std::size_t depth_ = 0
bool limit_steps_
std::size_t max_depth_
std::size_t max_nodes_
const std::string operation_
std::size_t remaining_steps_
std::unordered_map< const SymbolicNode *, Entry > shapes_

友元

struct RewriteBudgetTestAccess

详细描述

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


类说明

◆ LMCAS::detail::RewriteBudget::Entry

struct LMCAS::detail::RewriteBudget::Entry

在文件 rewrite_budget.hpp 第 45 行定义.

LMCAS::detail::RewriteBudget::Entry 的协作图:
类成员
weak_ptr< const SymbolicNode > owner
Shape shape

◆ LMCAS::detail::RewriteBudget::Shape

struct LMCAS::detail::RewriteBudget::Shape

在文件 rewrite_budget.hpp 第 41 行定义.

LMCAS::detail::RewriteBudget::Shape 的协作图:
类成员
size_t height = 0
size_t nodes = 0

构造及析构函数说明

◆ RewriteBudget() [1/3]

LMCAS::detail::RewriteBudget::RewriteBudget ( ComputationContext & context,
std::size_t max_depth,
std::size_t max_nodes,
const char * operation )

在文件 rewrite_budget.cpp 第 70 行定义.

72 : context_(context), remaining_steps_(std::numeric_limits<std::size_t>::max()),
74 limit_steps_(false),
const ResourceLimits & limits() const noexcept
ComputationContext & context() const noexcept
std::size_t max_nodes() const noexcept
ComputationContext const std::string & operation
std::size_t max_ast_nodes
Reference-expanded nodes per AST or output forest.

引用了 context(), context_, limit_steps_, max_depth_, max_nodes(), max_nodes_, LMCAS::detail::operation, operation_ , 以及 remaining_steps_.

被这些函数引用 LMCAS::detail::RewriteBudget::Measurement::Measurement(), RewriteBudget(), input_nodes() , 以及 operator=().

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

◆ RewriteBudget() [2/3]

LMCAS::detail::RewriteBudget::RewriteBudget ( ComputationContext & context,
std::size_t max_steps,
std::size_t max_depth,
std::size_t max_nodes,
const char * operation )

在文件 rewrite_budget.cpp 第 77 行定义.

引用了 context(), context_, limit_steps_, max_depth_, max_nodes(), max_nodes_, LMCAS::detail::operation, operation_ , 以及 remaining_steps_.

函数调用图:

◆ RewriteBudget() [3/3]

LMCAS::detail::RewriteBudget::RewriteBudget ( const RewriteBudget & )
delete

引用了 RewriteBudget().

函数调用图:

成员函数说明

◆ append_size()

std::size_t LMCAS::detail::RewriteBudget::append_size ( std::size_t current,
std::size_t child )

在文件 rewrite_budget.cpp 第 188 行定义.

188 {
189 auto access = context_.consume_steps(0, operation_);
190 if (!access) { throw access.error(); }
191 if (child != 0 && current == 0) { consume(); }
192 if (current > max_nodes_ || child > max_nodes_ - current) {
194 }
195 return current + child;
196}
Result< void > consume_steps(std::size_t amount=1, const std::string &operation={})

引用了 consume(), LMCAS::ComputationContext::consume_steps(), context_, max_nodes_, operation_ , 以及 LMCAS::ResourceLimit.

被这些函数引用 LMCAS::equivalence_detail::anonymous_namespace{equivalence_complex.cpp}::ComplexProduct::accumulate(), LMCAS::anonymous_namespace{poly_utils.cpp}::add_checked_coefficients(), LMCAS::ExpandVisitor::append_child(), LMCAS::anonymous_namespace{inequality_solver_polynomial.cpp}::append_exact_factor_roots(), LMCAS::DifferentiationVisitor::append_result(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_complex.cpp}::canonicalize_product(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_complex.cpp}::canonicalize_sum(), LMCAS::ExpandVisitor::check_child_count(), LMCAS::anonymous_namespace{inequality_solver_polynomial.cpp}::check_interval_forest(), LMCAS::anonymous_namespace{inequality_solver_parametric.cpp}::checked_piecewise(), LMCAS::anonymous_namespace{poly_utils.cpp}::constant_to_poly(), LMCAS::SymbolicFactory::create_add(), LMCAS::SymbolicFactory::create_multiply(), LMCAS::vector_calculus_detail::curl_impl(), LMCAS::exterior_derivative_checked(), LMCAS::anonymous_namespace{normalization_products.cpp}::ProductAccumulator::finish(), LMCAS::vector_calculus_detail::gradient_impl(), LMCAS::vector_calculus_detail::hessian_impl(), LMCAS::vector_calculus_detail::jacobian_impl(), LMCAS::make_normalized_multiply_node(), LMCAS::anonymous_namespace{poly_utils.cpp}::multiply_checked_coefficients(), LMCAS::anonymous_namespace{symbolic_gcd.cpp}::multivariate_polynomial_to_expression(), LMCAS::normalization_append(), LMCAS::normalization_check_arithmetic(), LMCAS::normalization_check_arithmetic(), LMCAS::normalization_check_children(), LMCAS::normalization_check_children(), LMCAS::normalization_check_count(), LMCAS::NormalizationVisitor::normalize_matrix_product(), LMCAS::anonymous_namespace{symbolic_gcd.cpp}::polynomial_term_to_expression(), LMCAS::anonymous_namespace{residual_verification.cpp}::FormalResidual::register_canonical_radical(), LMCAS::anonymous_namespace{residual_verification.cpp}::FormalResidual::register_regular_atom(), LMCAS::anonymous_namespace{residual_verification.cpp}::FormalResidual::register_replacement(), LMCAS::anonymous_namespace{residual_verification.cpp}::FormalResidual::remember_angle(), LMCAS::anonymous_namespace{residual_verification.cpp}::replace_root_operands(), LMCAS::anonymous_namespace{residual_verification.cpp}::replace_root_power(), LMCAS::detail::anonymous_namespace{facts_query.cpp}::DomainTraversal::require(), LMCAS::equivalence_detail::rewrite_exp_log_basic_identity(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_exp_log.cpp}::rewrite_operands(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_trig.cpp}::rewrite_operands(), LMCAS::equivalence_detail::rewrite_trig_basic_identity(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_trig.cpp}::rewrite_trig_function(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_trig.cpp}::rewrite_trig_sum(), LMCAS::equivalence_detail::rewritten_complex(), LMCAS::anonymous_namespace{inequality_solver_parametric.cpp}::simplify_coefficients(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_trig.cpp}::unwrap_trig_negated_argument(), LMCAS::verified_quadratic_boundaries(), LMCAS::DifferentiationVisitor::visit(), LMCAS::DifferentiationVisitor::visit(), LMCAS::DifferentiationVisitor::visit(), LMCAS::DifferentiationVisitor::visit(), LMCAS::ExpandVisitor::visit(), LMCAS::NormalizationVisitor::visit(), LMCAS::NormalizationVisitor::visit(), LMCAS::NormalizationVisitor::visit() , 以及 LMCAS::detail::RewriteBudget::Measurement::visit_child().

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

◆ check_step_access()

void LMCAS::detail::RewriteBudget::check_step_access ( ) const
private

在文件 rewrite_budget.cpp 第 84 行定义.

84 {
85 auto access = context_.consume_steps(0, operation_);
86 if (!access) { throw access.error(); }
87 if (limit_steps_ && remaining_steps_ == 0) {
89 }
90}

引用了 LMCAS::ComputationContext::consume_steps(), context_, limit_steps_, operation_, remaining_steps_ , 以及 LMCAS::ResourceLimit.

被这些函数引用 consume(), enter() , 以及 measure_shape().

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

◆ commit_step()

void LMCAS::detail::RewriteBudget::commit_step ( )
private

在文件 rewrite_budget.cpp 第 92 行定义.

92 {
93 auto step = context_.consume_steps(1, operation_);
94 if (!step) { throw step.error(); }
96}

引用了 LMCAS::ComputationContext::consume_steps(), context_, limit_steps_, operation_ , 以及 remaining_steps_.

被这些函数引用 consume().

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

◆ consume()

void LMCAS::detail::RewriteBudget::consume ( )

◆ context()

ComputationContext & LMCAS::detail::RewriteBudget::context ( ) const
inlinenoexcept

在文件 rewrite_budget.hpp 第 24 行定义.

24{ return context_; }

引用了 context_.

被这些函数引用 RewriteBudget(), RewriteBudget(), LMCAS::anonymous_namespace{inequality_solver_polynomial.cpp}::append_exact_factor_roots(), LMCAS::anonymous_namespace{poly_utils.cpp}::checked_coefficient_count(), LMCAS::anonymous_namespace{residual_verification.cpp}::classify_residual(), LMCAS::detail::AssumptionFacts::collect_names(), LMCAS::anonymous_namespace{symbolic_factory.cpp}::discardable_zero_factor(), LMCAS::double_root_inequality_intervals(), LMCAS::anonymous_namespace{differential_geometry.cpp}::exterior_derivative_term(), LMCAS::anonymous_namespace{assumption_context.cpp}::has_visible_proof(), input_nodes(), LMCAS::anonymous_namespace{inequality_solver_parametric.cpp}::linear_interval(), LMCAS::lookup_integral(), LMCAS::detail::mixed_evaluate_at(), LMCAS::anonymous_namespace{poly_utils.cpp}::normalize_coefficient(), LMCAS::anonymous_namespace{symbolic_gcd.cpp}::polynomial_term_to_expression(), LMCAS::anonymous_namespace{residual_verification.cpp}::prove_exact_root_residual(), LMCAS::anonymous_namespace{residual_verification.cpp}::prove_normalized_residual(), LMCAS::anonymous_namespace{residual_verification.cpp}::prove_piecewise_residual(), LMCAS::anonymous_namespace{residual_verification.cpp}::replace_exact_root(), LMCAS::anonymous_namespace{inequality_solver_parametric.cpp}::simplify_coefficients(), LMCAS::anonymous_namespace{poly_utils.cpp}::trim_checked_coefficients(), LMCAS::verified_quadratic_boundaries() , 以及 LMCAS::ExpandVisitor::visit().

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

◆ enter()

void LMCAS::detail::RewriteBudget::enter ( )

在文件 rewrite_budget.cpp 第 103 行定义.

103 {
105 if (depth_ >= max_depth_) {
107 }
108 auto entered = context_.enter_recursion(operation_);
109 if (!entered) { throw entered.error(); }
111 ++depth_;
112}
Result< void > enter_recursion(const std::string &operation={})

引用了 check_step_access(), context_, depth_, LMCAS::ComputationContext::enter_recursion(), limit_steps_, max_depth_, operation_, remaining_steps_ , 以及 LMCAS::ResourceLimit.

被这些函数引用 LMCAS::detail::RewriteScope::RewriteScope().

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

◆ input_nodes()

std::size_t LMCAS::detail::RewriteBudget::input_nodes ( const std::shared_ptr< const SymbolicNode > & lhs,
const std::shared_ptr< const SymbolicNode > & rhs,
ComputationContext & context,
std::size_t max_depth,
const char * operation )
static

在文件 rewrite_budget.cpp 第 198 行定义.

201 {
203 const auto left = budget.measure(lhs);
204 const auto right = budget.measure(rhs);
205 if (right > std::numeric_limits<std::size_t>::max() - left) {
207 }
208 return left + right;
209}
std::size_t measure(const std::shared_ptr< const SymbolicNode > &node)
RewriteBudget(ComputationContext &context, std::size_t max_depth, std::size_t max_nodes, const char *operation)
ExactRealAlgebraic rhs
const ExprPtr & right

引用了 RewriteBudget(), LMCAS::detail::budget, context(), measure(), LMCAS::detail::operation, LMCAS::ResourceLimit, LMCAS::detail::rhs , 以及 LMCAS::right.

被这些函数引用 LMCAS::anonymous_namespace{equivalence_engine.cpp}::equivalent_with_budget().

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

◆ leave()

void LMCAS::detail::RewriteBudget::leave ( )
noexcept

在文件 rewrite_budget.cpp 第 114 行定义.

114 {
115 --depth_;
117}

引用了 context_, depth_ , 以及 LMCAS::ComputationContext::leave_recursion().

被这些函数引用 LMCAS::detail::SymbolicVisitor::DepthGuard::~DepthGuard() , 以及 LMCAS::detail::RewriteScope::~RewriteScope().

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

◆ max_nodes()

std::size_t LMCAS::detail::RewriteBudget::max_nodes ( ) const
inlinenoexcept

在文件 rewrite_budget.hpp 第 25 行定义.

25{ return max_nodes_; }

引用了 max_nodes_.

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

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

◆ measure()

std::size_t LMCAS::detail::RewriteBudget::measure ( const std::shared_ptr< const SymbolicNode > & node)

在文件 rewrite_budget.cpp 第 179 行定义.

179 {
180 return measure_shape(node, 0, depth_).nodes;
181}
Shape measure_shape(const std::shared_ptr< const SymbolicNode > &node, std::size_t path_depth, std::size_t active_depth)
const SymbolicNodePtr & node(const ::LMCAS::SymbolicExpr &expression) noexcept

引用了 depth_, measure_shape(), LMCAS::detail::node() , 以及 LMCAS::detail::RewriteBudget::Shape::nodes.

被这些函数引用 LMCAS::anonymous_namespace{normalization_products.cpp}::ProductAccumulator::add_base(), LMCAS::anonymous_namespace{poly_utils.cpp}::add_checked_coefficients(), LMCAS::detail::all_variable_names(), LMCAS::ExpandVisitor::append_child(), LMCAS::anonymous_namespace{inequality_solver_polynomial.cpp}::append_exact_factor_roots(), LMCAS::equivalence_detail::canonicalize_complex_product(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_complex.cpp}::canonicalize_power(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_complex.cpp}::canonicalize_product(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_complex.cpp}::canonicalize_sum(), LMCAS::check_equivalent(), LMCAS::anonymous_namespace{inequality_solver_polynomial.cpp}::check_interval_forest(), LMCAS::check_zero_residual(), LMCAS::anonymous_namespace{inequality_solver_parametric.cpp}::checked_piecewise(), LMCAS::detail::AssumptionFacts::collect_names(), LMCAS::NormalizationVisitor::collect_sum(), LMCAS::anonymous_namespace{poly_utils.cpp}::constant_to_poly(), LMCAS::SymbolicFactory::create_add(), LMCAS::SymbolicFactory::create_multiply(), LMCAS::vector_calculus_detail::curl_impl(), LMCAS::detail::differentiate_node(), LMCAS::anonymous_namespace{differentiation_functions.cpp}::elementary_outer(), LMCAS::detail::expand_node(), LMCAS::exterior_derivative_checked(), LMCAS::anonymous_namespace{differential_geometry.cpp}::exterior_derivative_term(), LMCAS::vector_calculus_detail::gradient_impl(), LMCAS::vector_calculus_detail::hessian_impl(), LMCAS::anonymous_namespace{differentiation_functions.cpp}::hyperbolic_outer(), input_nodes(), LMCAS::anonymous_namespace{differentiation_functions.cpp}::inverse_trigonometric_outer(), LMCAS::vector_calculus_detail::jacobian_impl(), LMCAS::lookup_integral(), LMCAS::detail::anonymous_namespace{facts_query.cpp}::DomainTraversal::make(), LMCAS::make_normalized_multiply_node(), LMCAS::detail::materialize_integral(), LMCAS::matrix_multiply_checked(), LMCAS::anonymous_namespace{poly_utils.cpp}::multiply_checked_coefficients(), LMCAS::anonymous_namespace{symbolic_gcd.cpp}::multivariate_polynomial_to_expression(), LMCAS::normalization_append(), LMCAS::normalization_check_arithmetic(), LMCAS::normalization_check_children(), LMCAS::normalization_check_children(), LMCAS::detail::anonymous_namespace{complex_quadratic.cpp}::normalize(), LMCAS::NormalizationVisitor::normalize_matrix_product(), LMCAS::detail::normalize_node(), LMCAS::anonymous_namespace{symbolic_gcd.cpp}::polynomial_term_to_expression(), LMCAS::InferenceEngine::Impl::positive_relation_chain(), LMCAS::anonymous_namespace{equivalence_engine.cpp}::prove_checked_operands(), LMCAS::anonymous_namespace{residual_verification.cpp}::prove_piecewise_residual(), LMCAS::anonymous_namespace{inequality_solver_polynomial.cpp}::rational_polynomial_expression(), LMCAS::anonymous_namespace{residual_verification.cpp}::FormalResidual::register_canonical_radical(), LMCAS::anonymous_namespace{residual_verification.cpp}::FormalResidual::register_regular_atom(), LMCAS::anonymous_namespace{residual_verification.cpp}::FormalResidual::register_replacement(), LMCAS::anonymous_namespace{residual_verification.cpp}::FormalResidual::remember_angle(), LMCAS::anonymous_namespace{residual_verification.cpp}::replace_root_operands(), LMCAS::anonymous_namespace{residual_verification.cpp}::replace_root_power(), LMCAS::detail::anonymous_namespace{facts_query.cpp}::DomainTraversal::require(), LMCAS::equivalence_detail::rewrite_exp_log_basic_identity(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_exp_log.cpp}::rewrite_negative_lambert_exponential(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_exp_log.cpp}::rewrite_operands(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_trig.cpp}::rewrite_operands(), LMCAS::equivalence_detail::rewrite_trig_basic_identity(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_trig.cpp}::rewrite_trig_function(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_trig.cpp}::rewrite_trig_sum(), LMCAS::equivalence_detail::rewritten_complex(), LMCAS::scale_integral_field(), LMCAS::anonymous_namespace{inequality_solver_parametric.cpp}::simplify_coefficients(), LMCAS::anonymous_namespace{differentiation_functions.cpp}::special_outer(), LMCAS::detail::substitute_expression(), LMCAS::detail::substitute_node(), LMCAS::symbolic_polynomial_content(), LMCAS::symbolic_polynomial_gcd(), LMCAS::detail::symbolic_to_poly_checked(), LMCAS::anonymous_namespace{differentiation_functions.cpp}::trigonometric_outer(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_trig.cpp}::unwrap_trig_negated_argument() , 以及 LMCAS::verified_quadratic_boundaries().

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

◆ measure_result()

std::size_t LMCAS::detail::RewriteBudget::measure_result ( const std::shared_ptr< const SymbolicNode > & node)

在文件 rewrite_budget.cpp 第 183 行定义.

183 {
184 // The result root replaces the current rewrite frame.
185 return measure_shape(node, 0, depth_ == 0 ? 0 : depth_ - 1).nodes;
186}

引用了 depth_, measure_shape(), LMCAS::detail::node() , 以及 LMCAS::detail::RewriteBudget::Shape::nodes.

被这些函数引用 LMCAS::DifferentiationVisitor::set_result(), LMCAS::ExpandVisitor::set_result() , 以及 LMCAS::NormalizationVisitor::set_result().

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

◆ measure_shape()

RewriteBudget::Shape LMCAS::detail::RewriteBudget::measure_shape ( const std::shared_ptr< const SymbolicNode > & node,
std::size_t path_depth,
std::size_t active_depth )
private

在文件 rewrite_budget.cpp 第 139 行定义.

140 {
142 auto step = context_.consume_steps(1, operation_);
143 if (!step) { throw step.error(); }
144 if (!node) { return {}; }
145 {
146 const auto found = shapes_.find(node.get());
147 if (found != shapes_.end()) {
148 const auto owner = found->second.owner.lock();
149 if (owner && owner.get() == node.get()) {
150 const auto shape = found->second.shape;
151 require_shape(shape, path_depth, active_depth);
152 return shape;
153 }
154 shapes_.erase(found);
155 }
156 }
157 if (path_depth >= max_depth_) {
159 }
160 Shape shape;
161 {
162 MeasurementRecursion recursion(context_, operation_);
163 Measurement measurement(*this, path_depth, active_depth);
164 node->accept(measurement);
165 shape = measurement.shape;
166 }
167 require_shape(shape, path_depth, active_depth);
168 if (max_nodes_ != 0) {
169 if (shapes_.size() >= max_nodes_) {
170 auto cleared = context_.consume_steps(shapes_.size(), operation_);
171 if (!cleared) { throw cleared.error(); }
172 shapes_.clear();
173 }
174 shapes_.emplace(node.get(), Entry{node, shape});
175 }
176 return shape;
177}
std::unordered_map< const SymbolicNode *, Entry > shapes_
void require_shape(const Shape &shape, std::size_t path_depth, std::size_t active_depth) const

引用了 check_step_access(), LMCAS::ComputationContext::consume_steps(), context_, max_depth_, max_nodes_, LMCAS::detail::node(), operation_, require_shape(), LMCAS::ResourceLimit, LMCAS::detail::RewriteBudget::Measurement::shape , 以及 shapes_.

被这些函数引用 measure(), measure_result() , 以及 LMCAS::detail::RewriteBudget::Measurement::visit_child().

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

◆ operator=()

RewriteBudget & LMCAS::detail::RewriteBudget::operator= ( const RewriteBudget & )
delete

引用了 RewriteBudget().

函数调用图:

◆ require_nodes()

void LMCAS::detail::RewriteBudget::require_nodes ( std::size_t nodes) const

在文件 rewrite_budget.cpp 第 119 行定义.

119 {
120 auto access = context_.require_ast_nodes(nodes, operation_);
121 if (!access) { throw access.error(); }
122 if (nodes > max_nodes_) {
124 }
125}
Result< void > require_ast_nodes(std::size_t amount, const std::string &operation={}) const

引用了 context_, max_nodes_, operation_, LMCAS::ComputationContext::require_ast_nodes() , 以及 LMCAS::ResourceLimit.

被这些函数引用 LMCAS::equivalence_detail::anonymous_namespace{equivalence_complex.cpp}::ComplexProduct::accumulate(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_complex.cpp}::canonicalize_power(), LMCAS::check_negative_arg(), LMCAS::anonymous_namespace{poly_utils.cpp}::checked_coefficient_count(), LMCAS::anonymous_namespace{normalization_numeric_powers.cpp}::extract_small_square_factor(), LMCAS::anonymous_namespace{normalization_products.cpp}::ProductAccumulator::finish(), LMCAS::vector_calculus_detail::gradient_impl(), LMCAS::vector_calculus_detail::hessian_impl(), LMCAS::vector_calculus_detail::jacobian_impl(), LMCAS::anonymous_namespace{symbolic_gcd.cpp}::multivariate_polynomial_to_expression(), LMCAS::normalization_check_arithmetic(), LMCAS::normalization_check_children(), LMCAS::normalization_check_children(), LMCAS::normalization_imaginary_power(), LMCAS::normalization_numeric_function(), LMCAS::normalization_numeric_power(), LMCAS::normalization_pi_function(), LMCAS::anonymous_namespace{residual_verification.cpp}::FormalResidual::number(), LMCAS::anonymous_namespace{residual_verification.cpp}::replace_exact_root(), require_shape(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_exp_log.cpp}::rewrite_exp_log_function(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_exp_log.cpp}::rewrite_negative_lambert_exponential(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_exp_log.cpp}::rewrite_operands(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_trig.cpp}::rewrite_operands(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_trig.cpp}::rewrite_trig_sum(), LMCAS::anonymous_namespace{normalization_trigonometric.cpp}::scaled_radical(), LMCAS::ExpandVisitor::set_result(), LMCAS::equivalence_detail::anonymous_namespace{equivalence_trig.cpp}::unwrap_trig_negated_argument(), LMCAS::NormalizationVisitor::visit(), LMCAS::NormalizationVisitor::visit() , 以及 LMCAS::NormalizationVisitor::visit().

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

◆ require_shape()

void LMCAS::detail::RewriteBudget::require_shape ( const Shape & shape,
std::size_t path_depth,
std::size_t active_depth ) const
private

在文件 rewrite_budget.cpp 第 127 行定义.

128 {
129 require_nodes(shape.nodes);
130 const auto context_depth = context_.recursion_depth();
131 const auto context_limit = context_.limits().max_recursion_depth;
132 if (active_depth > max_depth_ || shape.height > max_depth_ - active_depth ||
133 path_depth > max_depth_ || shape.height > max_depth_ - path_depth ||
134 context_depth > context_limit || shape.height > context_limit - context_depth) {
136 }
137}
std::size_t recursion_depth() const noexcept
void require_nodes(std::size_t nodes) const
std::size_t max_recursion_depth
Simultaneous checked depth.

引用了 context_, LMCAS::detail::RewriteBudget::Shape::height, LMCAS::ComputationContext::limits(), max_depth_, LMCAS::ResourceLimits::max_recursion_depth, LMCAS::detail::RewriteBudget::Shape::nodes, operation_, LMCAS::ComputationContext::recursion_depth(), require_nodes() , 以及 LMCAS::ResourceLimit.

被这些函数引用 measure_shape().

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

◆ RewriteBudgetTestAccess

friend struct RewriteBudgetTestAccess
friend

在文件 rewrite_budget.hpp 第 40 行定义.

引用了 RewriteBudgetTestAccess.

被这些函数引用 RewriteBudgetTestAccess.

类成员变量说明

◆ context_

◆ depth_

std::size_t LMCAS::detail::RewriteBudget::depth_ = 0
private

在文件 rewrite_budget.hpp 第 61 行定义.

被这些函数引用 enter(), leave(), measure() , 以及 measure_result().

◆ limit_steps_

bool LMCAS::detail::RewriteBudget::limit_steps_
private

在文件 rewrite_budget.hpp 第 62 行定义.

被这些函数引用 RewriteBudget(), RewriteBudget(), check_step_access(), commit_step() , 以及 enter().

◆ max_depth_

std::size_t LMCAS::detail::RewriteBudget::max_depth_
private

在文件 rewrite_budget.hpp 第 59 行定义.

被这些函数引用 RewriteBudget(), RewriteBudget(), enter(), measure_shape() , 以及 require_shape().

◆ max_nodes_

std::size_t LMCAS::detail::RewriteBudget::max_nodes_
private

在文件 rewrite_budget.hpp 第 60 行定义.

被这些函数引用 RewriteBudget(), RewriteBudget(), append_size(), max_nodes(), measure_shape() , 以及 require_nodes().

◆ operation_

◆ remaining_steps_

std::size_t LMCAS::detail::RewriteBudget::remaining_steps_
private

在文件 rewrite_budget.hpp 第 58 行定义.

被这些函数引用 RewriteBudget(), RewriteBudget(), check_step_access(), commit_step() , 以及 enter().

◆ shapes_

std::unordered_map<const SymbolicNode*, Entry> LMCAS::detail::RewriteBudget::shapes_
private

在文件 rewrite_budget.hpp 第 64 行定义.

被这些函数引用 measure_shape().


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