https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
CompileTimeDerivatives::CTStandardDeviation< Ds > Class Template Reference

#include <CompileTimeDerivatives.h>

Inheritance diagram for CompileTimeDerivatives::CTStandardDeviation< Ds >:
[legend]

Public Types

typedef CTSuperType< typenameDs::ResultType... >::type ResultType
 

Public Member Functions

 CTStandardDeviation (std::tuple< Ds... > derivatives, CTMatrix< Real, N, N > covariance)
 
auto operator() () const
 

Static Public Member Functions

static constexpr int precedence ()
 precedence should reflect C++ operator precedence exactly (higher is binding tighter)
 
static constexpr bool leftAssociative ()
 left/right associative property should reflect C++ operator properties exactly
 

Static Public Attributes

static constexpr auto N = sizeof...(Ds)
 

Protected Member Functions

template<int R, std::size_t... Is>
ResultType rowMul (std::index_sequence< Is... >, const std::array< ResultType, N > &d) const
 
template<std::size_t... Is>
auto evalHelper (const std::index_sequence< Is... > &is) const
 

Protected Attributes

const std::tuple< Ds... > _derivatives
 
const CTMatrix< Real, N, N_covariance
 

Detailed Description

template<typename... Ds>
class CompileTimeDerivatives::CTStandardDeviation< Ds >

Definition at line 933 of file CompileTimeDerivatives.h.

Member Typedef Documentation

◆ ResultType

template<typename... Ds>
typedef CTSuperType<typenameDs::ResultType...>::type CompileTimeDerivatives::CTStandardDeviation< Ds >::ResultType

Definition at line 944 of file CompileTimeDerivatives.h.

Constructor & Destructor Documentation

◆ CTStandardDeviation()

template<typename... Ds>
CompileTimeDerivatives::CTStandardDeviation< Ds >::CTStandardDeviation ( std::tuple< Ds... >  derivatives,
CTMatrix< Real, N, N covariance 
)
inline

Definition at line 938 of file CompileTimeDerivatives.h.

939 : _derivatives(derivatives), _covariance(covariance)
940 {
941 }

Member Function Documentation

◆ evalHelper()

template<typename... Ds>
template<std::size_t... Is>
auto CompileTimeDerivatives::CTStandardDeviation< Ds >::evalHelper ( const std::index_sequence< Is... > &  is) const
inlineprotected

Definition at line 954 of file CompileTimeDerivatives.h.

955 {
956 const std::array<ResultType, N> d{std::get<Is>(_derivatives)()...};
957 return ((rowMul<Is>(is, d) * d[Is]) + ...);
958 }

Referenced by CompileTimeDerivatives::CTStandardDeviation< Ds >::operator()().

◆ leftAssociative()

static constexpr bool CompileTimeDerivatives::CTBase::leftAssociative ( )
inlinestaticconstexprinherited

left/right associative property should reflect C++ operator properties exactly

Definition at line 31 of file CompileTimeDerivatives.h.

31{ return false; }

◆ operator()()

template<typename... Ds>
auto CompileTimeDerivatives::CTStandardDeviation< Ds >::operator() ( ) const
inline

Definition at line 942 of file CompileTimeDerivatives.h.

942{ return std::sqrt(evalHelper(std::make_index_sequence<N>{})); }
auto evalHelper(const std::index_sequence< Is... > &is) const

◆ precedence()

static constexpr int CompileTimeDerivatives::CTBase::precedence ( )
inlinestaticconstexprinherited

precedence should reflect C++ operator precedence exactly (higher is binding tighter)

Definition at line 29 of file CompileTimeDerivatives.h.

29{ return 0; }

◆ rowMul()

template<typename... Ds>
template<int R, std::size_t... Is>
ResultType CompileTimeDerivatives::CTStandardDeviation< Ds >::rowMul ( std::index_sequence< Is... >  ,
const std::array< ResultType, N > &  d 
) const
inlineprotected

Definition at line 948 of file CompileTimeDerivatives.h.

949 {
950 return ((_covariance(R, Is) * d[Is]) + ...);
951 }

Member Data Documentation

◆ _covariance

template<typename... Ds>
const CTMatrix<Real, N, N> CompileTimeDerivatives::CTStandardDeviation< Ds >::_covariance
protected

◆ _derivatives

template<typename... Ds>
const std::tuple<Ds...> CompileTimeDerivatives::CTStandardDeviation< Ds >::_derivatives
protected

◆ N

template<typename... Ds>
constexpr auto CompileTimeDerivatives::CTStandardDeviation< Ds >::N = sizeof...(Ds)
staticconstexpr

Definition at line 936 of file CompileTimeDerivatives.h.


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