Files
MeanField_SERiF/docs/man/man3/serif_utils_dependencies_IncrementalComputation.3

106 lines
5.2 KiB
Groff
Raw Normal View History

.TH "serif::utils::dependencies::IncrementalComputation< KeyT, ValueT, InputsT, FunctionT >" 3 "Version v0.0.1a" "SERiF" \" -*- nroff -*-
.ad l
.nh
.SH NAME
serif::utils::dependencies::IncrementalComputation< KeyT, ValueT, InputsT, FunctionT > \- A calculation may reuse unchanged pieces of its previous immutable result\&.
.SH SYNOPSIS
.br
.PP
.PP
\fR#include <incremental_computation\&.hpp>\fP
.SS "Public Types"
.in +1c
.ti -1c
.RI "using \fBKey\fP = KeyT"
.br
.ti -1c
.RI "using \fBInputs\fP = std::remove_cvref_t<InputsT>"
.br
.ti -1c
.RI "using \fBFunction\fP = FunctionT"
.br
.ti -1c
.RI "using \fBUpdate\fP = \fBComputationUpdate\fP<\fBInputs\fP, ValueT>"
.br
.in -1c
.SS "Public Member Functions"
.in +1c
.ti -1c
.RI "\fBIncrementalComputation\fP (FunctionT function)"
.br
.RI "Own a callable taking (update, declared inputs\&.\&.\&.) and returning Value or expected<Value, Error>\&. "
.ti -1c
.RI "template<typename\&.\&.\&. Arguments>
.br
requires std::invocable<const FunctionT&, const \fBUpdate\fP&, const Arguments&\&.\&.\&.> && std::same_as<typename \fBdetail::Result\fP<std::remove_cv_t<std::invoke_result_t<const FunctionT&, const \fBUpdate\fP&, const Arguments&\&.\&.\&.>>>::Value, ValueT>decltype(auto) \fBevaluate\fP (const Arguments &\&.\&.\&. arguments) const"
.br
.RI "Without a cache, evaluation is a complete calculation with no previous result\&. "
.ti -1c
.RI "template<typename\&.\&.\&. Arguments> decltype(auto) \fBevaluate_update\fP (const \fBUpdate\fP &update, const Arguments &\&.\&.\&. arguments) const"
.br
.RI "Previous state is read-only; only the returned candidate can become the next accepted result\&. "
.in -1c
.SS "Static Public Attributes"
.in +1c
.ti -1c
.RI "static constexpr bool \fBowns_inputs\fP = false"
.br
.in -1c
.SS "Private Attributes"
.in +1c
.ti -1c
.RI "FunctionT \fBm_function\fP"
.br
.in -1c
.SH "Detailed Description"
.PP
.SS "template<typename KeyT, typename ValueT, IsKeyList InputsT, typename FunctionT>
.br
requires std::is_object_v<ValueT> && std::move_constructible<ValueT>
.br
class serif::utils::dependencies::IncrementalComputation< KeyT, ValueT, InputsT, FunctionT >"A calculation may reuse unchanged pieces of its previous immutable result\&.
.SH "Member Typedef Documentation"
.PP
.SS "template<typename KeyT, typename ValueT, IsKeyList InputsT, typename FunctionT> using \fBserif::utils::dependencies::IncrementalComputation\fP< KeyT, ValueT, InputsT, FunctionT >::Function = FunctionT"
.SS "template<typename KeyT, typename ValueT, IsKeyList InputsT, typename FunctionT> using \fBserif::utils::dependencies::IncrementalComputation\fP< KeyT, ValueT, InputsT, FunctionT >::Inputs = std::remove_cvref_t<InputsT>"
.SS "template<typename KeyT, typename ValueT, IsKeyList InputsT, typename FunctionT> using \fBserif::utils::dependencies::IncrementalComputation\fP< KeyT, ValueT, InputsT, FunctionT >::Key = KeyT"
.SS "template<typename KeyT, typename ValueT, IsKeyList InputsT, typename FunctionT> using \fBserif::utils::dependencies::IncrementalComputation\fP< KeyT, ValueT, InputsT, FunctionT >::Update = \fBComputationUpdate\fP<\fBInputs\fP, ValueT>"
.SH "Constructor & Destructor Documentation"
.PP
.SS "template<typename KeyT, typename ValueT, IsKeyList InputsT, typename FunctionT> \fBserif::utils::dependencies::IncrementalComputation\fP< KeyT, ValueT, InputsT, FunctionT >::IncrementalComputation (FunctionT function)\fR [inline]\fP, \fR [explicit]\fP"
.PP
Own a callable taking (update, declared inputs\&.\&.\&.) and returning Value or expected<Value, Error>\&.
.SH "Member Function Documentation"
.PP
.SS "template<typename KeyT, typename ValueT, IsKeyList InputsT, typename FunctionT> template<typename\&.\&.\&. Arguments>
.br
requires std::invocable<const FunctionT&, const \fBUpdate\fP&, const Arguments&\&.\&.\&.> && std::same_as<typename \fBdetail::Result\fP<std::remove_cv_t<std::invoke_result_t<const FunctionT&, const \fBUpdate\fP&, const Arguments&\&.\&.\&.>>>::Value, ValueT>decltype(auto) \fBserif::utils::dependencies::IncrementalComputation\fP< KeyT, ValueT, InputsT, FunctionT >::evaluate (const Arguments &\&.\&.\&. arguments) const\fR [inline]\fP, \fR [nodiscard]\fP"
.PP
Without a cache, evaluation is a complete calculation with no previous result\&.
.SS "template<typename KeyT, typename ValueT, IsKeyList InputsT, typename FunctionT> template<typename\&.\&.\&. Arguments> decltype(auto) \fBserif::utils::dependencies::IncrementalComputation\fP< KeyT, ValueT, InputsT, FunctionT >::evaluate_update (const \fBUpdate\fP & update, const Arguments &\&.\&.\&. arguments) const\fR [inline]\fP, \fR [nodiscard]\fP"
.PP
Previous state is read-only; only the returned candidate can become the next accepted result\&.
.SH "Member Data Documentation"
.PP
.SS "template<typename KeyT, typename ValueT, IsKeyList InputsT, typename FunctionT> FunctionT \fBserif::utils::dependencies::IncrementalComputation\fP< KeyT, ValueT, InputsT, FunctionT >::m_function\fR [private]\fP"
.SS "template<typename KeyT, typename ValueT, IsKeyList InputsT, typename FunctionT> bool \fBserif::utils::dependencies::IncrementalComputation\fP< KeyT, ValueT, InputsT, FunctionT >::owns_inputs = false\fR [static]\fP, \fR [constexpr]\fP"
.SH "Author"
.PP
Generated automatically by Doxygen for SERiF from the source code\&.