SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::utils::dependencies::Computation< KeyT, InputsT, FunctionT, OwnsInputs > Class Template Reference

#include <computation.hpp>

Public Types

using Key = KeyT
 
using Inputs = std::remove_cvref_t<InputsT>
 
using Function = FunctionT
 

Public Member Functions

 Computation (FunctionT function)
 Own the callable; result-affecting mutable state belongs in the declared inputs.
 
template<typename... Arguments>
requires std::invocable<const FunctionT&, const Arguments&...>
decltype(auto) evaluate (const Arguments &... arguments) const
 Supply inputs in declaration order and infer the result from the callable.
 

Static Public Attributes

static constexpr bool owns_inputs = OwnsInputs
 

Private Attributes

FunctionT m_function
 

Member Typedef Documentation

◆ Function

template<typename KeyT, IsKeyList InputsT, typename FunctionT, bool OwnsInputs = false>
using serif::utils::dependencies::Computation< KeyT, InputsT, FunctionT, OwnsInputs >::Function = FunctionT

◆ Inputs

template<typename KeyT, IsKeyList InputsT, typename FunctionT, bool OwnsInputs = false>
using serif::utils::dependencies::Computation< KeyT, InputsT, FunctionT, OwnsInputs >::Inputs = std::remove_cvref_t<InputsT>

◆ Key

template<typename KeyT, IsKeyList InputsT, typename FunctionT, bool OwnsInputs = false>
using serif::utils::dependencies::Computation< KeyT, InputsT, FunctionT, OwnsInputs >::Key = KeyT

Constructor & Destructor Documentation

◆ Computation()

template<typename KeyT, IsKeyList InputsT, typename FunctionT, bool OwnsInputs = false>
serif::utils::dependencies::Computation< KeyT, InputsT, FunctionT, OwnsInputs >::Computation ( FunctionT function)
inlineexplicit

Own the callable; result-affecting mutable state belongs in the declared inputs.

Member Function Documentation

◆ evaluate()

template<typename KeyT, IsKeyList InputsT, typename FunctionT, bool OwnsInputs = false>
template<typename... Arguments>
requires std::invocable<const FunctionT&, const Arguments&...>
decltype(auto) serif::utils::dependencies::Computation< KeyT, InputsT, FunctionT, OwnsInputs >::evaluate ( const Arguments &... arguments) const
inlinenodiscard

Supply inputs in declaration order and infer the result from the callable.

Member Data Documentation

◆ m_function

template<typename KeyT, IsKeyList InputsT, typename FunctionT, bool OwnsInputs = false>
FunctionT serif::utils::dependencies::Computation< KeyT, InputsT, FunctionT, OwnsInputs >::m_function
private

◆ owns_inputs

template<typename KeyT, IsKeyList InputsT, typename FunctionT, bool OwnsInputs = false>
bool serif::utils::dependencies::Computation< KeyT, InputsT, FunctionT, OwnsInputs >::owns_inputs = OwnsInputs
staticconstexpr

The documentation for this class was generated from the following file: