alpaqa 0.0.1
Nonconvex constrained optimization
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes | List of all members
CasADiFunctionEvaluator< N_in, N_out > Class Template Reference

#include <alpaqa/interop/casadi/CasADiFunctionWrapper.hpp>

Detailed Description

template<size_t N_in, size_t N_out>
class CasADiFunctionEvaluator< N_in, N_out >

Class for evaluating CasADi functions, allocating the necessary workspace storage in advance for allocation-free evaluations.

Definition at line 17 of file CasADiFunctionWrapper.hpp.

+ Collaboration diagram for CasADiFunctionEvaluator< N_in, N_out >:

Public Types

using casadi_dim = std::pair< casadi_int, casadi_int >
 

Public Member Functions

 CasADiFunctionEvaluator (casadi::Function &&f, const casadi_dim(&dim_in)[N_in]={}, const casadi_dim(&dim_out)[N_out]={})
 
void validate_dimensions (const casadi_dim(&dim_in)[N_in], const casadi_dim(&dim_out)[N_out])
 
void operator() (const double *const (&in)[N_in], double *const (&out)[N_out]) const
 

Public Attributes

casadi::Function fun
 

Protected Member Functions

void operator() (const double *const *in, double *const *out) const
 

Private Attributes

std::vector< casadi_int > iwork
 
std::vector< double > dwork
 

Member Typedef Documentation

◆ casadi_dim

using casadi_dim = std::pair<casadi_int, casadi_int>

Definition at line 19 of file CasADiFunctionWrapper.hpp.

Constructor & Destructor Documentation

◆ CasADiFunctionEvaluator()

CasADiFunctionEvaluator ( casadi::Function &&  f,
const casadi_dim(&)  dim_in[N_in] = {},
const casadi_dim(&)  dim_out[N_out] = {} 
)
inline
Exceptions
std::invalid_argument

Definition at line 22 of file CasADiFunctionWrapper.hpp.

Member Function Documentation

◆ validate_dimensions()

void validate_dimensions ( const casadi_dim(&)  dim_in[N_in],
const casadi_dim(&)  dim_out[N_out] 
)
inline
Exceptions
std::invalid_argument

Definition at line 34 of file CasADiFunctionWrapper.hpp.

◆ operator()() [1/2]

void operator() ( const double *const *  in,
double *const *  out 
) const
inlineprotected

Definition at line 60 of file CasADiFunctionWrapper.hpp.

+ Here is the caller graph for this function:

◆ operator()() [2/2]

void operator() ( const double *const (&)  in[N_in],
double *const (&)  out[N_out] 
) const
inline

Definition at line 66 of file CasADiFunctionWrapper.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ fun

casadi::Function fun

Definition at line 72 of file CasADiFunctionWrapper.hpp.

◆ iwork

std::vector<casadi_int> iwork
mutableprivate

Definition at line 75 of file CasADiFunctionWrapper.hpp.

◆ dwork

std::vector<double> dwork
mutableprivate

Definition at line 76 of file CasADiFunctionWrapper.hpp.


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