https://mooseframework.inl.gov
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< typename Ds::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) More...
 
static constexpr bool leftAssociative ()
 left/right associative property should reflect C++ operator properties exactly More...
 

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 925 of file CompileTimeDerivatives.h.

Member Typedef Documentation

◆ ResultType

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

Definition at line 936 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 930 of file CompileTimeDerivatives.h.

931  : _derivatives(derivatives), _covariance(covariance)
932  {
933  }

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 946 of file CompileTimeDerivatives.h.

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

947  {
948  const std::array<ResultType, N> d{std::get<Is>(_derivatives)()...};
949  return ((rowMul<Is>(is, d) * d[Is]) + ...);
950  }

◆ leftAssociative()

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

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 934 of file CompileTimeDerivatives.h.

934 { return std::sqrt(evalHelper(std::make_index_sequence<N>{})); }
auto evalHelper(const std::index_sequence< Is... > &is) const
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh

◆ precedence()

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

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 940 of file CompileTimeDerivatives.h.

941  {
942  return ((_covariance(R, Is) * d[Is]) + ...);
943  }

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)
static

Definition at line 928 of file CompileTimeDerivatives.h.


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