Calculators =========== Calculators compute values of expressions, residuals of equations and truth-values of logical expressions. .. cpp:namespace:: hysj .. cpp:namespace-push:: calculators Basic ----- :cpp:include:`#include` In namespace :cpp:any:`calculators`: A basic calculator implementation. Does a recursive post-order traversal from each operation to be evaluated. Uses cached results if they exists, else evaluates the operation. .. cpp:struct:: basic .. cpp:type:: cache_type .. cpp:member:: mathematics::program program .. cpp:member:: cache_type cache .. cpp:function:: basic(const mathematics::program &p) | Create a calculator for :cpp:expr:`p`. | .. cpp:function:: void operator()(const mathematics::equation_ids &equations, \ const mathematics::expression_ids ¶meters, \ std::span valuation, \ std::span result); | Stores :cpp:expr:`valuation` for :cpp:expr:`parameters` in cache, compute the residuals of the :cpp:expr:`equations` and store them in :cpp:expr:`result`. | .. cpp:namespace-pop::