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 1191 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 1233 of file calculus.hpp.

1234  {
1235  double d_real[2] = {static_cast<double>(d[0]), static_cast<double>(d[1])};
1236  casadi_math<double>::der(op, static_cast<double>(x), static_cast<double>(y),
1237  static_cast<double>(f), d_real);
1238  d[0] = static_cast<casadi_int>(d_real[0]);
1239  d[1] = static_cast<casadi_int>(d_real[1]);
1240  }
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:1375

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 1245 of file calculus.hpp.

1246  {
1247  double d_real[2] = {static_cast<double>(d[0]), static_cast<double>(d[1])};
1248  double f_real = static_cast<double>(f);
1249  casadi_math<double>::derF(op, static_cast<double>(x), static_cast<double>(y), f_real, d_real);
1250  f = static_cast<casadi_int>(f_real);
1251  d[0] = static_cast<casadi_int>(d_real[0]);
1252  d[1] = static_cast<casadi_int>(d_real[1]);
1253  }
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:1437

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 1196 of file calculus.hpp.

1197  {
1198  double ff(0);
1199  casadi_math<double>::fun(op, static_cast<double>(x), static_cast<double>(y), ff);
1200  f = static_cast<casadi_int>(ff);
1201  }
static void fun(unsigned char op, const T &x, const T &y, T &f)
Evaluate a built in function (scalar-scalar)
Definition: calculus.hpp:1289

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 1221 of file calculus.hpp.

1222  {
1223  for (casadi_int i=0; i<n; ++i) {
1224  double ff;
1225  casadi_math<double>::fun(op, static_cast<double>(x), static_cast<double>(*y++), ff);
1226  *f++ = static_cast<casadi_int>(ff);
1227  }
1228  }

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 1212 of file calculus.hpp.

1213  {
1214  for (casadi_int i=0; i<n; ++i) {
1215  double ff;
1216  casadi_math<double>::fun(op, static_cast<double>(*x++), static_cast<double>(y), ff);
1217  *f++ = static_cast<casadi_int>(ff);
1218  }
1219  }

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 1203 of file calculus.hpp.

1204  {
1205  for (casadi_int i=0; i<n; ++i) {
1206  double ff(0);
1207  casadi_math<double>::fun(op, static_cast<double>(*x++), static_cast<double>(*y++), ff);
1208  *f++ = static_cast<casadi_int>(ff);
1209  }
1210  }

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

◆ name()

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

Definition at line 1275 of file calculus.hpp.

1275  {
1276  return casadi_math<double>::name(op);
1277  }
static std::string name(unsigned char op)
Definition: calculus.hpp:1655

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 1258 of file calculus.hpp.

1258  {
1259  return casadi_math<double>::ndeps(op);
1260  }
static casadi_int ndeps(unsigned char op)
Number of dependencies.
Definition: calculus.hpp:1623

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

◆ post()

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

Definition at line 1281 of file calculus.hpp.

1281  {
1282  return casadi_math<double>::post(op);
1283  }
static std::string post(unsigned char op)
Definition: calculus.hpp:1791

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

◆ pre()

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

Definition at line 1272 of file calculus.hpp.

1272  {
1273  return casadi_math<double>::pre(op);
1274  }
static std::string pre(unsigned char op)
Definition: calculus.hpp:1750

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 1269 of file calculus.hpp.

1269  {
1270  return casadi_math<double>::print(op, x);
1271  }
static std::string print(unsigned char op, const std::string &x, const std::string &y)
Print.
Definition: calculus.hpp:1641

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 1265 of file calculus.hpp.

1266  {
1267  return casadi_math<double>::print(op, x, y);
1268  }

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

◆ sep()

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

Definition at line 1278 of file calculus.hpp.

1278  {
1279  return casadi_math<double>::sep(op);
1280  }
static std::string sep(unsigned char op)
Definition: calculus.hpp:1773

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


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