sigma  0.0.0
Loading...
Searching...
No Matches
sigma::detail_::Setter< UncertainType > Class Template Reference

Modifies an unceratin variable. More...

#include <setter.hpp>

Public Types

using my_t = Setter<UncertainType>
 Type of the instance.
 
using uncertain_t = UncertainType
 The numeric type of the variable.
 
using value_t = typename uncertain_t::value_t
 The type of the values of the variable.
 
using dep_sd_t = typename uncertain_t::dep_sd_t
 The type of a standard deviation that this instance depends on.
 
using dep_sd_ptr = typename uncertain_t::dep_sd_ptr
 A pointer to a dependency of this variable.
 
using deps_map_t = typename uncertain_t::deps_map_t
 The type of the map holding the variable's dependencies.
 

Public Member Functions

 Setter (uncertain_t &u)
 Construct a Setter for a variable.
 
void update_mean (value_t mean)
 Update the mean of the wrapped variable.
 
void update_sd ()
 Calculate the standatd deviation of m_x_ based on the uncertainty of its dependencies.
 
void update_derivatives (value_t dxda, bool call_update_std=true)
 Update of existing derivatives.
 
void update_derivatives (const deps_map_t &deps, value_t dxda, bool call_update_std=true)
 Update/addition of derivatives.
 

Detailed Description

template<typename UncertainType>
class sigma::detail_::Setter< UncertainType >

Modifies an unceratin variable.

This class provides a handle for operations to modify the private members of Uncertain instances.

Template Parameters
UncertainTypeThe type of the variable this will modify

Constructor & Destructor Documentation

◆ Setter()

template<typename UncertainType>
sigma::detail_::Setter< UncertainType >::Setter ( uncertain_t & u)
inline

Construct a Setter for a variable.

Parameters
uThe uncertain variable *this will modify.
Exceptions
noneNo throw guarantee

Member Function Documentation

◆ update_derivatives() [1/2]

template<typename UncertainType>
void sigma::detail_::Setter< UncertainType >::update_derivatives ( const deps_map_t & deps,
value_t dxda,
bool call_update_std = true )
inline

Update/addition of derivatives.

Parameters
depsThe dependencies to update
dxdaThe partial derivative of this variable with respect to the dependency
call_update_stdWhether or not to update the standard deviation after updating the dependencies. Primarily for minimizing repetitive work when multiple updates will be performed
Exceptions
noneNo throw guarantee

◆ update_derivatives() [2/2]

template<typename UncertainType>
void sigma::detail_::Setter< UncertainType >::update_derivatives ( value_t dxda,
bool call_update_std = true )
inline

Update of existing derivatives.

Parameters
dxdaThe partial derivative of the variable
call_update_stdWhether or not to update the standard deviation after updating the dependencies. Primarily for minimizing repetitive work when multiple updates will be performed
Exceptions
noneNo throw guarantee

◆ update_mean()

template<typename UncertainType>
void sigma::detail_::Setter< UncertainType >::update_mean ( value_t mean)
inline

Update the mean of the wrapped variable.

Parameters
meanThe new mean value of the variable
Exceptions
noneNo throw guarantee

◆ update_sd()

template<typename UncertainType>
void sigma::detail_::Setter< UncertainType >::update_sd ( )
inline

Calculate the standatd deviation of m_x_ based on the uncertainty of its dependencies.

Exceptions
noneNo throw guarantee

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