alpaqa 1.0.0a19
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CasADiFunctionEvaluator< Conf, N_in, N_out > Class Template Reference

#include <alpaqa/casadi/CasADiFunctionWrapper.hpp>

Detailed Description

template<Config Conf, size_t N_in, size_t N_out>
class alpaqa::casadi_loader::CasADiFunctionEvaluator< Conf, N_in, N_out >

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

Definition at line 30 of file CasADiFunctionWrapper.hpp.

+ Collaboration diagram for CasADiFunctionEvaluator< Conf, N_in, N_out >:

Public Types

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

Public Member Functions

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

Static Public Member Functions

static void validate_num_args (const casadi::Function &fun)
 
static void validate_dimensions (const casadi::Function &fun, const std::array< casadi_dim, N_in > &dim_in={}, const std::array< casadi_dim, N_out > &dim_out={})
 

Public Attributes

casadi::Function fun
 

Member Typedef Documentation

◆ casadi_dim

template<Config Conf, size_t N_in, size_t N_out>
using casadi_dim = std::pair<casadi_int, casadi_int>

Definition at line 35 of file CasADiFunctionWrapper.hpp.

Constructor & Destructor Documentation

◆ CasADiFunctionEvaluator() [1/2]

template<Config Conf, size_t N_in, size_t N_out>
CasADiFunctionEvaluator ( casadi::Function &&  f)
inline
Exceptions
invalid_argument_dimensions

Definition at line 38 of file CasADiFunctionWrapper.hpp.

+ Here is the call graph for this function:

◆ CasADiFunctionEvaluator() [2/2]

template<Config Conf, size_t N_in, size_t N_out>
CasADiFunctionEvaluator ( casadi::Function &&  f,
const std::array< casadi_dim, N_in > &  dim_in,
const std::array< casadi_dim, N_out > &  dim_out 
)
inline
Exceptions
invalid_argument_dimensions

Definition at line 50 of file CasADiFunctionWrapper.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ validate_num_args()

template<Config Conf, size_t N_in, size_t N_out>
static void validate_num_args ( const casadi::Function fun)
inlinestatic
Exceptions
invalid_argument_dimensions

Definition at line 58 of file CasADiFunctionWrapper.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validate_dimensions() [1/2]

template<Config Conf, size_t N_in, size_t N_out>
static void validate_dimensions ( const casadi::Function fun,
const std::array< casadi_dim, N_in > &  dim_in = {},
const std::array< casadi_dim, N_out > &  dim_out = {} 
)
inlinestatic
Exceptions
invalid_argument_dimensions

Definition at line 74 of file CasADiFunctionWrapper.hpp.

+ Here is the caller graph for this function:

◆ validate_dimensions() [2/2]

template<Config Conf, size_t N_in, size_t N_out>
void validate_dimensions ( const std::array< casadi_dim, N_in > &  dim_in = {},
const std::array< casadi_dim, N_out > &  dim_out = {} 
)
inline
Exceptions
invalid_argument_dimensions

Definition at line 107 of file CasADiFunctionWrapper.hpp.

◆ operator()()

template<Config Conf, size_t N_in, size_t N_out>
void operator() ( const double *const (&)  in[N_in],
double *const (&)  out[N_out] 
)
inline

Definition at line 127 of file CasADiFunctionWrapper.hpp.

Member Data Documentation

◆ fun

template<Config Conf, size_t N_in, size_t N_out>
casadi::Function fun

Definition at line 134 of file CasADiFunctionWrapper.hpp.


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