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

1244  {
1245  double d_real[2] = {static_cast<double>(d[0]), static_cast<double>(d[1])};
1246  casadi_math<double>::der(op, static_cast<double>(x), static_cast<double>(y),
1247  static_cast<double>(f), d_real);
1248  d[0] = static_cast<casadi_int>(d_real[0]);
1249  d[1] = static_cast<casadi_int>(d_real[1]);
1250  }
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:1385

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

1256  {
1257  double d_real[2] = {static_cast<double>(d[0]), static_cast<double>(d[1])};
1258  double f_real = static_cast<double>(f);
1259  casadi_math<double>::derF(op, static_cast<double>(x), static_cast<double>(y), f_real, d_real);
1260  f = static_cast<casadi_int>(f_real);
1261  d[0] = static_cast<casadi_int>(d_real[0]);
1262  d[1] = static_cast<casadi_int>(d_real[1]);
1263  }
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:1447

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

1207  {
1208  double ff(0);
1209  casadi_math<double>::fun(op, static_cast<double>(x), static_cast<double>(y), ff);
1210  f = static_cast<casadi_int>(ff);
1211  }
static void fun(unsigned char op, const T &x, const T &y, T &f)
Evaluate a built in function (scalar-scalar)
Definition: calculus.hpp:1299

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

1232  {
1233  for (casadi_int i=0; i<n; ++i) {
1234  double ff;
1235  casadi_math<double>::fun(op, static_cast<double>(x), static_cast<double>(*y++), ff);
1236  *f++ = static_cast<casadi_int>(ff);
1237  }
1238  }

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

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

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

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

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

◆ name()

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

Definition at line 1285 of file calculus.hpp.

1285  {
1286  return casadi_math<double>::name(op);
1287  }
static std::string name(unsigned char op)
Definition: calculus.hpp:1665

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

1268  {
1269  return casadi_math<double>::ndeps(op);
1270  }
static casadi_int ndeps(unsigned char op)
Number of dependencies.
Definition: calculus.hpp:1633

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

◆ post()

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

Definition at line 1291 of file calculus.hpp.

1291  {
1292  return casadi_math<double>::post(op);
1293  }
static std::string post(unsigned char op)
Definition: calculus.hpp:1803

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

◆ pre()

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

Definition at line 1282 of file calculus.hpp.

1282  {
1283  return casadi_math<double>::pre(op);
1284  }
static std::string pre(unsigned char op)
Definition: calculus.hpp:1762

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

1279  {
1280  return casadi_math<double>::print(op, x);
1281  }
static std::string print(unsigned char op, const std::string &x, const std::string &y)
Print.
Definition: calculus.hpp:1651

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

1276  {
1277  return casadi_math<double>::print(op, x, y);
1278  }

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

◆ sep()

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

Definition at line 1288 of file calculus.hpp.

1288  {
1289  return casadi_math<double>::sep(op);
1290  }
static std::string sep(unsigned char op)
Definition: calculus.hpp:1785

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


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