|
SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
|
A calculation may reuse unchanged pieces of its previous immutable result. More...
#include <incremental_computation.hpp>
Public Types | |
| using | Key = KeyT |
| using | Inputs = std::remove_cvref_t<InputsT> |
| using | Function = FunctionT |
| using | Update = ComputationUpdate<Inputs, ValueT> |
Public Member Functions | |
| IncrementalComputation (FunctionT function) | |
| Own a callable taking (update, declared inputs...) and returning Value or expected<Value, Error>. | |
| template<typename... Arguments> requires std::invocable<const FunctionT&, const Update&, const Arguments&...> && std::same_as<typename detail::Result<std::remove_cv_t<std::invoke_result_t<const FunctionT&, const Update&, const Arguments&...>>>::Value, ValueT> | |
| decltype(auto) | evaluate (const Arguments &... arguments) const |
| Without a cache, evaluation is a complete calculation with no previous result. | |
| template<typename... Arguments> | |
| decltype(auto) | evaluate_update (const Update &update, const Arguments &... arguments) const |
| Previous state is read-only; only the returned candidate can become the next accepted result. | |
Static Public Attributes | |
| static constexpr bool | owns_inputs = false |
Private Attributes | |
| FunctionT | m_function |
A calculation may reuse unchanged pieces of its previous immutable result.
| using serif::utils::dependencies::IncrementalComputation< KeyT, ValueT, InputsT, FunctionT >::Function = FunctionT |
| using serif::utils::dependencies::IncrementalComputation< KeyT, ValueT, InputsT, FunctionT >::Inputs = std::remove_cvref_t<InputsT> |
| using serif::utils::dependencies::IncrementalComputation< KeyT, ValueT, InputsT, FunctionT >::Key = KeyT |
| using serif::utils::dependencies::IncrementalComputation< KeyT, ValueT, InputsT, FunctionT >::Update = ComputationUpdate<Inputs, ValueT> |
|
inlineexplicit |
Own a callable taking (update, declared inputs...) and returning Value or expected<Value, Error>.
|
inlinenodiscard |
Without a cache, evaluation is a complete calculation with no previous result.
|
inlinenodiscard |
Previous state is read-only; only the returned candidate can become the next accepted result.
|
private |
|
staticconstexpr |