alpaqa no-casadi-dep
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 builtin::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 28 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 33 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 36 of file CasADiFunctionWrapper.hpp.

◆ 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 48 of file CasADiFunctionWrapper.hpp.

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 56 of file CasADiFunctionWrapper.hpp.

◆ 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 72 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 105 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 125 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 132 of file CasADiFunctionWrapper.hpp.


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