List of all members | Static Public Member Functions
casadi::casadi_math< casadi_int > Struct Reference

Specialize the class so that it can be used with integer type. More...

#include <calculus.hpp>

Detailed Description

Definition at line 1215 of file calculus.hpp.

Static Public Member Functions

static void fun (unsigned char op, const casadi_int &x, const casadi_int &y, casadi_int &f)
 Evaluate a built in function. More...
 
static void fun (unsigned char op, const casadi_int *x, const casadi_int *y, casadi_int *f, casadi_int n)
 
static void fun (unsigned char op, const casadi_int *x, const casadi_int &y, casadi_int *f, casadi_int n)
 
static void fun (unsigned char op, const casadi_int &x, const casadi_int *y, casadi_int *f, casadi_int n)
 
static void der (unsigned char op, const casadi_int &x, const casadi_int &y, const casadi_int &f, casadi_int *d)
 Evaluate a built in derivative function. More...
 
static void derF (unsigned char op, const casadi_int &x, const casadi_int &y, casadi_int &f, casadi_int *d)
 Evaluate the function and the derivative function. More...
 
static casadi_int ndeps (unsigned char op)
 Number of dependencies. More...
 
static std::string print (unsigned char op, const std::string &x, const std::string &y)
 Print. More...
 
static std::string print (unsigned char op, const std::string &x)
 
static std::string pre (unsigned char op)
 
static std::string name (unsigned char op)
 
static std::string sep (unsigned char op)
 
static std::string post (unsigned char op)
 

Member Function Documentation

◆ der()

static void casadi::casadi_math< casadi_int >::der ( unsigned char  op,
const casadi_int &  x,
const casadi_int &  y,
const casadi_int &  f,
casadi_int *  d 
)
inlinestatic

Extra doc: https://github.com/casadi/casadi/wiki/L_1gh

Definition at line 1257 of file calculus.hpp.

1258  {
1259  double d_real[2] = {static_cast<double>(d[0]), static_cast<double>(d[1])};
1260  casadi_math<double>::der(op, static_cast<double>(x), static_cast<double>(y),
1261  static_cast<double>(f), d_real);
1262  d[0] = static_cast<casadi_int>(d_real[0]);
1263  d[1] = static_cast<casadi_int>(d_real[1]);
1264  }
static void der(unsigned char op, const T &x, const T &y, const T &f, T *d)
Evaluate a built in derivative function.
Definition: calculus.hpp:1399

References casadi::casadi_math< T >::der().

◆ derF()

static void casadi::casadi_math< casadi_int >::derF ( unsigned char  op,
const casadi_int &  x,
const casadi_int &  y,
casadi_int &  f,
casadi_int *  d 
)
inlinestatic

Extra doc: https://github.com/casadi/casadi/wiki/L_1gi

Definition at line 1269 of file calculus.hpp.

1270  {
1271  double d_real[2] = {static_cast<double>(d[0]), static_cast<double>(d[1])};
1272  double f_real = static_cast<double>(f);
1273  casadi_math<double>::derF(op, static_cast<double>(x), static_cast<double>(y), f_real, d_real);
1274  f = static_cast<casadi_int>(f_real);
1275  d[0] = static_cast<casadi_int>(d_real[0]);
1276  d[1] = static_cast<casadi_int>(d_real[1]);
1277  }
static void derF(unsigned char op, const T &x, const T &y, T &f, T *d)
Evaluate the function and the derivative function.
Definition: calculus.hpp:1461

References casadi::casadi_math< T >::derF().

◆ fun() [1/4]

static void casadi::casadi_math< casadi_int >::fun ( unsigned char  op,
const casadi_int &  x,
const casadi_int &  y,
casadi_int &  f 
)
inlinestatic

Extra doc: https://github.com/casadi/casadi/wiki/L_1gg

Definition at line 1220 of file calculus.hpp.

1221  {
1222  double ff(0);
1223  casadi_math<double>::fun(op, static_cast<double>(x), static_cast<double>(y), ff);
1224  f = static_cast<casadi_int>(ff);
1225  }
static void fun(unsigned char op, const T &x, const T &y, T &f)
Evaluate a built in function (scalar-scalar)
Definition: calculus.hpp:1313

References casadi::casadi_math< T >::fun().

◆ fun() [2/4]

static void casadi::casadi_math< casadi_int >::fun ( unsigned char  op,
const casadi_int &  x,
const casadi_int *  y,
casadi_int *  f,
casadi_int  n 
)
inlinestatic

Definition at line 1245 of file calculus.hpp.

1246  {
1247  for (casadi_int i=0; i<n; ++i) {
1248  double ff;
1249  casadi_math<double>::fun(op, static_cast<double>(x), static_cast<double>(*y++), ff);
1250  *f++ = static_cast<casadi_int>(ff);
1251  }
1252  }

References casadi::casadi_math< T >::fun().

◆ fun() [3/4]

static void casadi::casadi_math< casadi_int >::fun ( unsigned char  op,
const casadi_int *  x,
const casadi_int &  y,
casadi_int *  f,
casadi_int  n 
)
inlinestatic

Definition at line 1236 of file calculus.hpp.

1237  {
1238  for (casadi_int i=0; i<n; ++i) {
1239  double ff;
1240  casadi_math<double>::fun(op, static_cast<double>(*x++), static_cast<double>(y), ff);
1241  *f++ = static_cast<casadi_int>(ff);
1242  }
1243  }

References casadi::casadi_math< T >::fun().

◆ fun() [4/4]

static void casadi::casadi_math< casadi_int >::fun ( unsigned char  op,
const casadi_int *  x,
const casadi_int *  y,
casadi_int *  f,
casadi_int  n 
)
inlinestatic

Definition at line 1227 of file calculus.hpp.

1228  {
1229  for (casadi_int i=0; i<n; ++i) {
1230  double ff(0);
1231  casadi_math<double>::fun(op, static_cast<double>(*x++), static_cast<double>(*y++), ff);
1232  *f++ = static_cast<casadi_int>(ff);
1233  }
1234  }

References casadi::casadi_math< T >::fun().

◆ name()

static std::string casadi::casadi_math< casadi_int >::name ( unsigned char  op)
inlinestatic

Definition at line 1299 of file calculus.hpp.

1299  {
1300  return casadi_math<double>::name(op);
1301  }
static std::string name(unsigned char op)
Definition: calculus.hpp:1679

References casadi::casadi_math< T >::name().

◆ ndeps()

static casadi_int casadi::casadi_math< casadi_int >::ndeps ( unsigned char  op)
inlinestatic

Extra doc: https://github.com/casadi/casadi/wiki/L_1gj

Definition at line 1282 of file calculus.hpp.

1282  {
1283  return casadi_math<double>::ndeps(op);
1284  }
static casadi_int ndeps(unsigned char op)
Number of dependencies.
Definition: calculus.hpp:1647

References casadi::casadi_math< T >::ndeps().

◆ post()

static std::string casadi::casadi_math< casadi_int >::post ( unsigned char  op)
inlinestatic

Definition at line 1305 of file calculus.hpp.

1305  {
1306  return casadi_math<double>::post(op);
1307  }
static std::string post(unsigned char op)
Definition: calculus.hpp:1817

References casadi::casadi_math< T >::post().

◆ pre()

static std::string casadi::casadi_math< casadi_int >::pre ( unsigned char  op)
inlinestatic

Definition at line 1296 of file calculus.hpp.

1296  {
1297  return casadi_math<double>::pre(op);
1298  }
static std::string pre(unsigned char op)
Definition: calculus.hpp:1776

References casadi::casadi_math< T >::pre().

◆ print() [1/2]

static std::string casadi::casadi_math< casadi_int >::print ( unsigned char  op,
const std::string &  x 
)
inlinestatic

Definition at line 1293 of file calculus.hpp.

1293  {
1294  return casadi_math<double>::print(op, x);
1295  }
static std::string print(unsigned char op, const std::string &x, const std::string &y)
Print.
Definition: calculus.hpp:1665

References casadi::casadi_math< T >::print().

◆ print() [2/2]

static std::string casadi::casadi_math< casadi_int >::print ( unsigned char  op,
const std::string &  x,
const std::string &  y 
)
inlinestatic

Extra doc: https://github.com/casadi/casadi/wiki/L_1gk

Definition at line 1289 of file calculus.hpp.

1290  {
1291  return casadi_math<double>::print(op, x, y);
1292  }

References casadi::casadi_math< T >::print().

◆ sep()

static std::string casadi::casadi_math< casadi_int >::sep ( unsigned char  op)
inlinestatic

Definition at line 1302 of file calculus.hpp.

1302  {
1303  return casadi_math<double>::sep(op);
1304  }
static std::string sep(unsigned char op)
Definition: calculus.hpp:1799

References casadi::casadi_math< T >::sep().


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