CoDiPack  2.2.0
A Code Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
codi::Hessian< T_T, T_Store > Struct Template Reference

Default implementation of the Hessian interface. More...

#include <hessian.hpp>

Inheritance diagram for codi::Hessian< T_T, T_Store >:

Public Types

using Store = T_Store
 See Hessian.
 
using T = T_T
 See Hessian.
 
- Public Types inherited from codi::HessianInterface< T_T >
using T = T_T
 See HessianInterface.
 

Public Member Functions

size_t getM () const
 Get size of rows (output variables).
 
size_t getN () const
 Get size of columns (input variables).
 
 Hessian (size_t m, size_t n)
 Constructor.
 
Toperator() (size_t const i, size_t const j, size_t const k)
 Reference access.
 
T operator() (size_t const i, size_t const j, size_t const k) const
 Value access.
 
void resize (size_t const m, size_t const n)
 Resize to the new dimensions.
 
size_t size () const
 Get total size of the Hessian.
 
- Public Member Functions inherited from codi::HessianInterface< T_T >
size_t getM () const
 Get size of rows (output variables).
 
size_t getN () const
 Get size of columns (input variables).
 
Toperator() (size_t const i, size_t const j, size_t const k)
 Reference access.
 
T operator() (size_t const i, size_t const j, size_t const k) const
 Value access.
 
void resize (size_t const m, size_t const n)
 Resize to the new dimensions.
 
size_t size () const
 Get total size of the Hessian.
 
virtual ~HessianInterface ()
 Destructor.
 

Protected Attributes

size_t m
 Number of function outputs.
 
size_t n
 Number of function inputs.
 
Store values
 Storage for the data.
 

Detailed Description

template<typename T_T, typename T_Store = std::vector<T_T>>
struct codi::Hessian< T_T, T_Store >

Default implementation of the Hessian interface.

Running index speed: j (fastest), i, k (slowest).

Data is stored in an array of row-major matrices.

Template Parameters
T_TData type in the Hessian.
T_StoreStorage allocator. Should implement the standard vector interface.

Member Function Documentation

◆ getM()

template<typename T_T , typename T_Store = std::vector<T_T>>
size_t codi::Hessian< T_T, T_Store >::getM ( ) const
inline

Get size of rows (output variables).

◆ getN()

template<typename T_T , typename T_Store = std::vector<T_T>>
size_t codi::Hessian< T_T, T_Store >::getN ( ) const
inline

Get size of columns (input variables).

◆ operator()() [1/2]

template<typename T_T , typename T_Store = std::vector<T_T>>
T & codi::Hessian< T_T, T_Store >::operator() ( size_t const  i,
size_t const  j,
size_t const  k 
)
inline

Reference access.

Parameters
[in]iOutput value of the function. Range: [0, m).
[in]jInput value of the function. First derivative direction. Range: [0,n).
[in]kInput value of the function. Second derivative direction. Range: [0,n).

◆ operator()() [2/2]

template<typename T_T , typename T_Store = std::vector<T_T>>
T codi::Hessian< T_T, T_Store >::operator() ( size_t const  i,
size_t const  j,
size_t const  k 
) const
inline

Value access.

Parameters
[in]iOutput value of the function. Range: [0, m).
[in]jInput value of the function. First derivative direction. Range: [0,n).
[in]kInput value of the function. Second derivative direction. Range: [0,n).

◆ resize()

template<typename T_T , typename T_Store = std::vector<T_T>>
void codi::Hessian< T_T, T_Store >::resize ( size_t const  m,
size_t const  n 
)
inline

Resize to the new dimensions.

◆ size()

template<typename T_T , typename T_Store = std::vector<T_T>>
size_t codi::Hessian< T_T, T_Store >::size ( ) const
inline

Get total size of the Hessian.


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