CppADCodeGen 2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
Loading...
Searching...
No Matches
CppAD::cg::CGAtomicGenericModel< Base > Class Template Reference

#include <atomic_generic_model.hpp>

Inheritance diagram for CppAD::cg::CGAtomicGenericModel< Base >:
Inheritance graph
Collaboration diagram for CppAD::cg::CGAtomicGenericModel< Base >:
Collaboration graph

Public Member Functions

 CGAtomicGenericModel (GenericModel< Base > &model)
 
template<class ADVector >
void operator() (const ADVector &ax, ADVector &ay, size_t id=0)
 
bool forward (size_t q, size_t p, const CppAD::vector< bool > &vx, CppAD::vector< bool > &vy, const CppAD::vector< Base > &tx, CppAD::vector< Base > &ty) override
 
bool reverse (size_t p, const CppAD::vector< Base > &tx, const CppAD::vector< Base > &ty, CppAD::vector< Base > &px, const CppAD::vector< Base > &py) override
 
bool for_sparse_jac (size_t q, const CppAD::vector< std::set< size_t > > &r, CppAD::vector< std::set< size_t > > &s, const CppAD::vector< Base > &x) override
 
bool for_sparse_jac (size_t q, const CppAD::vector< std::set< size_t > > &r, CppAD::vector< std::set< size_t > > &s) override
 
bool rev_sparse_jac (size_t q, const CppAD::vector< std::set< size_t > > &rT, CppAD::vector< std::set< size_t > > &sT, const CppAD::vector< Base > &x) override
 
bool rev_sparse_jac (size_t q, const CppAD::vector< std::set< size_t > > &rT, CppAD::vector< std::set< size_t > > &sT) override
 
bool rev_sparse_hes (const CppAD::vector< bool > &vx, const CppAD::vector< bool > &s, CppAD::vector< bool > &t, size_t q, const CppAD::vector< std::set< size_t > > &r, const CppAD::vector< std::set< size_t > > &u, CppAD::vector< std::set< size_t > > &v, const CppAD::vector< Base > &x) override
 
bool rev_sparse_hes (const CppAD::vector< bool > &vx, const CppAD::vector< bool > &s, CppAD::vector< bool > &t, size_t q, const CppAD::vector< std::set< size_t > > &r, const CppAD::vector< std::set< size_t > > &u, CppAD::vector< std::set< size_t > > &v) override
 

Protected Attributes

GenericModel< Base > & model_
 

Detailed Description

template<class Base>
class CppAD::cg::CGAtomicGenericModel< Base >

An atomic function that uses a compiled model

Author
Joao Leal

Definition at line 28 of file atomic_generic_model.hpp.

Constructor & Destructor Documentation

◆ CGAtomicGenericModel()

template<class Base >
CppAD::cg::CGAtomicGenericModel< Base >::CGAtomicGenericModel ( GenericModel< Base > & model)
inline

Creates a new atomic function wrapper that is responsible for calling the appropriate methods of the compiled model.

Parameters
modelThe compiled model.

Definition at line 39 of file atomic_generic_model.hpp.

Member Function Documentation

◆ for_sparse_jac() [1/2]

template<class Base >
bool CppAD::cg::CGAtomicGenericModel< Base >::for_sparse_jac ( size_t q,
const CppAD::vector< std::set< size_t > > & r,
CppAD::vector< std::set< size_t > > & s )
inlineoverride

Definition at line 92 of file atomic_generic_model.hpp.

◆ for_sparse_jac() [2/2]

template<class Base >
bool CppAD::cg::CGAtomicGenericModel< Base >::for_sparse_jac ( size_t q,
const CppAD::vector< std::set< size_t > > & r,
CppAD::vector< std::set< size_t > > & s,
const CppAD::vector< Base > & x )
inlineoverride

Definition at line 85 of file atomic_generic_model.hpp.

◆ forward()

template<class Base >
bool CppAD::cg::CGAtomicGenericModel< Base >::forward ( size_t q,
size_t p,
const CppAD::vector< bool > & vx,
CppAD::vector< bool > & vy,
const CppAD::vector< Base > & tx,
CppAD::vector< Base > & ty )
inlineoverride

Definition at line 52 of file atomic_generic_model.hpp.

◆ operator()()

template<class Base >
template<class ADVector >
void CppAD::cg::CGAtomicGenericModel< Base >::operator() ( const ADVector & ax,
ADVector & ay,
size_t id = 0 )
inline

Definition at line 48 of file atomic_generic_model.hpp.

◆ rev_sparse_hes() [1/2]

template<class Base >
bool CppAD::cg::CGAtomicGenericModel< Base >::rev_sparse_hes ( const CppAD::vector< bool > & vx,
const CppAD::vector< bool > & s,
CppAD::vector< bool > & t,
size_t q,
const CppAD::vector< std::set< size_t > > & r,
const CppAD::vector< std::set< size_t > > & u,
CppAD::vector< std::set< size_t > > & v )
inlineoverride

V(x) = f'^T(x) U(x) + Sum( s(x)i f''(x) R )

S(x) * f'(x)

Definition at line 144 of file atomic_generic_model.hpp.

◆ rev_sparse_hes() [2/2]

template<class Base >
bool CppAD::cg::CGAtomicGenericModel< Base >::rev_sparse_hes ( const CppAD::vector< bool > & vx,
const CppAD::vector< bool > & s,
CppAD::vector< bool > & t,
size_t q,
const CppAD::vector< std::set< size_t > > & r,
const CppAD::vector< std::set< size_t > > & u,
CppAD::vector< std::set< size_t > > & v,
const CppAD::vector< Base > & x )
inlineoverride

Definition at line 133 of file atomic_generic_model.hpp.

◆ rev_sparse_jac() [1/2]

template<class Base >
bool CppAD::cg::CGAtomicGenericModel< Base >::rev_sparse_jac ( size_t q,
const CppAD::vector< std::set< size_t > > & rT,
CppAD::vector< std::set< size_t > > & sT )
inlineoverride

Definition at line 116 of file atomic_generic_model.hpp.

◆ rev_sparse_jac() [2/2]

template<class Base >
bool CppAD::cg::CGAtomicGenericModel< Base >::rev_sparse_jac ( size_t q,
const CppAD::vector< std::set< size_t > > & rT,
CppAD::vector< std::set< size_t > > & sT,
const CppAD::vector< Base > & x )
inlineoverride

Definition at line 109 of file atomic_generic_model.hpp.

◆ reverse()

template<class Base >
bool CppAD::cg::CGAtomicGenericModel< Base >::reverse ( size_t p,
const CppAD::vector< Base > & tx,
const CppAD::vector< Base > & ty,
CppAD::vector< Base > & px,
const CppAD::vector< Base > & py )
inlineoverride

Definition at line 69 of file atomic_generic_model.hpp.

Member Data Documentation

◆ model_

template<class Base >
GenericModel<Base>& CppAD::cg::CGAtomicGenericModel< Base >::model_
protected

Definition at line 30 of file atomic_generic_model.hpp.


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