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

Default implementation of the Jacobian interface. More...

#include <jacobian.hpp>

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

Public Types

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

Public Member Functions

size_t getM () const
 Get size of rows (output variables).
 
size_t getN () const
 Get size of columns (input variables).
 
 Jacobian (size_t const m, size_t const n)
 m = rows (output variables), n = columns (input variables)
 
Toperator() (size_t const i, size_t const j)
 Reference access, i in [0, ..., m), j in [0, ..., n).
 
T operator() (size_t const i, size_t const j) const
 Value access, i in [0, ..., m), j in [0, ..., n).
 
void resize (size_t const m, size_t const n)
 Resize the Jacobian.
 
size_t size () const
 Get total size of the Jacobian.
 
- Public Member Functions inherited from codi::JacobianInterface< 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)
 Reference access, i in [0, ..., m), j in [0, ..., n).
 
T operator() (size_t const i, size_t const j) const
 Value access, i in [0, ..., m), j in [0, ..., n).
 
void resize (size_t const m, size_t const n)
 Resize the Jacobian.
 
void setLogic (size_t const i, size_t const j, T const &v)
 Interface for the JacobianDelayAccessor.
 
size_t size () const
 Get total size of the Jacobian.
 

Protected Member Functions

size_t computeIndex (size_t const i, size_t const j) const
 Convert row and column to an index in the storage array.
 

Protected Attributes

size_t m
 Number of rows (output variables).
 
size_t n
 Number of columns (input variables).
 
Store values
 Array store for the data.
 

Detailed Description

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

Default implementation of the Jacobian interface.

Data is stored in a row-major format.

Template Parameters
T_TThe data type in the Jacobian.
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::Jacobian< 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::Jacobian< 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::Jacobian< T_T, T_Store >::operator() ( size_t const  i,
size_t const  j 
)
inline

Reference access, i in [0, ..., m), j in [0, ..., n).

◆ operator()() [2/2]

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

Value access, i in [0, ..., m), j in [0, ..., n).

◆ resize()

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

Resize the Jacobian.

Implementation: Old values are not overwritten.

◆ size()

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

Get total size of the Jacobian.


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