Drake
drakeMexUtil.h File Reference
#include <mex.h>
#include <vector>
#include <Eigen/Core>
#include <Eigen/Sparse>
#include "drake/util/TrigPoly.h"
#include <unsupported/Eigen/AutoDiff>
#include <Eigen/src/SparseCore/SparseMatrix.h>
#include "drake/math/autodiff.h"
#include "drake/util/drakeGradientUtil.h"
Include dependency graph for drakeMexUtil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DLLEXPORT
 

Functions

DLLEXPORT bool isa (const mxArray *mxa, const char *class_str)
 
DLLEXPORT bool mexCallMATLABsafe (int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[], const char *filename)
 
DLLEXPORT doublemxGetPrSafe (const mxArray *pobj)
 
DLLEXPORT mxArray * mxGetPropertySafe (const mxArray *array, std::string const &field_name)
 
DLLEXPORT mxArray * mxGetFieldSafe (const mxArray *array, std::string const &field_name)
 
DLLEXPORT mxArray * mxGetPropertySafe (const mxArray *array, size_t index, std::string const &field_name)
 
DLLEXPORT mxArray * mxGetFieldSafe (const mxArray *array, size_t index, std::string const &field_name)
 
DLLEXPORT void mxSetFieldSafe (mxArray *array, size_t index, std::string const &fieldname, mxArray *data)
 
DLLEXPORT mxArray * mxGetFieldOrPropertySafe (const mxArray *array, std::string const &field_name)
 
DLLEXPORT mxArray * mxGetFieldOrPropertySafe (const mxArray *array, size_t index, std::string const &field_name)
 
DLLEXPORT mxArray * createDrakeMexPointer (void *ptr, const std::string &name="", int type_id=-1, int num_additional_inputs=0, mxArray *delete_fcn_additional_inputs[]=NULL, const std::string &subclass_name="", const std::string &mex_function_name_prefix="")
 
DLLEXPORT void * getDrakeMexPointer (const mxArray *mx)
 
template<typename Derived >
void destroyDrakeMexPointer (const mxArray *mx)
 
template<typename Derived >
DLLEXPORT mxArray * eigenToMatlabSparse (Eigen::MatrixBase< Derived > const &M, int &num_non_zero)
 
template<typename DerivedA >
mxArray * eigenToMatlab (const DerivedA &m)
 
template<int RowsAtCompileTime, int ColsAtCompileTime>
Eigen::Matrix< double, RowsAtCompileTime, ColsAtCompileTime > matlabToEigen (const mxArray *matlab_array)
 
template<int Rows, int Cols>
Eigen::Map< const Eigen::Matrix< double, Rows, Cols > > matlabToEigenMap (const mxArray *mex)
 
DLLEXPORT Eigen::SparseMatrix< doublematlabToEigenSparse (const mxArray *mex)
 
DLLEXPORT std::string mxGetStdString (const mxArray *array)
 
DLLEXPORT std::vector< std::string > mxGetVectorOfStdStrings (const mxArray *array)
 
template<typename Scalar >
mxArray * stdVectorToMatlab (const std::vector< Scalar > &vec)
 
DLLEXPORT mxArray * stdStringToMatlab (const std::string &str)
 
DLLEXPORT mxArray * vectorOfStdStringsToMatlab (const std::vector< std::string > &strs)
 
DLLEXPORT void sizecheck (const mxArray *mat, mwSize M, mwSize N)
 
template<size_t Rows, size_t Cols>
void matlabToCArrayOfArrays (const mxArray *source, double(&destination)[Rows][Cols])
 
DLLEXPORT mwSize sub2ind (mwSize ndims, const mwSize *dims, const mwSize *sub)
 
template<typename T >
const std::vector< T > matlabToStdVector (const mxArray *in)
 
DLLEXPORT Eigen::Matrix< Polynomiald, Eigen::Dynamic, Eigen::Dynamic > msspolyToEigen (const mxArray *msspoly)
 
template<int _Rows, int _Cols>
mxArray * eigenToMSSPoly (const Eigen::Matrix< Polynomiald, _Rows, _Cols > &poly)
 
DLLEXPORT Eigen::Matrix< TrigPolyd, Eigen::Dynamic, Eigen::Dynamic > trigPolyToEigen (const mxArray *trigpoly)
 
template<int _Rows, int _Cols>
mxArray * eigenToTrigPoly (const Eigen::Matrix< TrigPolyd, _Rows, _Cols > &trigpoly_mat)
 
template<int Rows, int Cols>
Eigen::Matrix< Eigen::AutoDiffScalar< Eigen::VectorXd >, Rows, Cols > taylorVarToEigen (const mxArray *taylor_var)
 
template<typename Derived >
mxArray * eigenToTaylorVar (const Eigen::MatrixBase< Derived > &m, int num_variables=Eigen::Dynamic)
 
template<int RowsAtCompileTime, int ColsAtCompileTime, typename DerType >
mxArray * eigenToMatlabGeneral (const Eigen::MatrixBase< Eigen::Matrix< Eigen::AutoDiffScalar< DerType >, RowsAtCompileTime, ColsAtCompileTime >> &mat)
 
template<int RowsAtCompileTime, int ColsAtCompileTime>
mxArray * eigenToMatlabGeneral (const Eigen::MatrixBase< Eigen::Matrix< TrigPolyd, RowsAtCompileTime, ColsAtCompileTime >> &mat)
 
template<int RowsAtCompileTime, int ColsAtCompileTime>
mxArray * eigenToMatlabGeneral (const Eigen::MatrixBase< Eigen::Matrix< double, RowsAtCompileTime, ColsAtCompileTime >> &mat)
 

Macro Definition Documentation

#define DLLEXPORT

Function Documentation

DLLEXPORT mxArray* createDrakeMexPointer ( void *  ptr,
const std::string &  name = "",
int  type_id = -1,
int  num_additional_inputs = 0,
mxArray *  delete_fcn_additional_inputs[] = NULL,
const std::string &  subclass_name = "",
const std::string &  mex_function_name_prefix = "" 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void destroyDrakeMexPointer ( const mxArray *  mx)
inline

Here is the call graph for this function:

mxArray* eigenToMatlab ( const DerivedA &  m)

Here is the caller graph for this function:

mxArray* eigenToMatlabGeneral ( const Eigen::MatrixBase< Eigen::Matrix< Eigen::AutoDiffScalar< DerType >, RowsAtCompileTime, ColsAtCompileTime >> &  mat)

Here is the call graph for this function:

mxArray* eigenToMatlabGeneral ( const Eigen::MatrixBase< Eigen::Matrix< TrigPolyd, RowsAtCompileTime, ColsAtCompileTime >> &  mat)
mxArray* eigenToMatlabGeneral ( const Eigen::MatrixBase< Eigen::Matrix< double, RowsAtCompileTime, ColsAtCompileTime >> &  mat)

Here is the call graph for this function:

DLLEXPORT mxArray* eigenToMatlabSparse ( Eigen::MatrixBase< Derived > const &  M,
int &  num_non_zero 
)

Here is the caller graph for this function:

mxArray* eigenToMSSPoly ( const Eigen::Matrix< Polynomiald, _Rows, _Cols > &  poly)

Here is the call graph for this function:

mxArray* eigenToTaylorVar ( const Eigen::MatrixBase< Derived > &  m,
int  num_variables = Eigen::Dynamic 
)

Here is the call graph for this function:

Here is the caller graph for this function:

mxArray* eigenToTrigPoly ( const Eigen::Matrix< TrigPolyd, _Rows, _Cols > &  trigpoly_mat)

Here is the call graph for this function:

DLLEXPORT void* getDrakeMexPointer ( const mxArray *  mx)

Here is the caller graph for this function:

DLLEXPORT bool isa ( const mxArray *  mxa,
const char *  class_str 
)

Here is the caller graph for this function:

void matlabToCArrayOfArrays ( const mxArray *  source,
double(&)  destination[Rows][Cols] 
)

Here is the call graph for this function:

Eigen::Matrix<double, RowsAtCompileTime, ColsAtCompileTime> matlabToEigen ( const mxArray *  matlab_array)
Eigen::Map<const Eigen::Matrix<double, Rows, Cols> > matlabToEigenMap ( const mxArray *  mex)

Here is the call graph for this function:

Here is the caller graph for this function:

DLLEXPORT Eigen::SparseMatrix<double> matlabToEigenSparse ( const mxArray *  mex)

Here is the caller graph for this function:

const std::vector<T> matlabToStdVector ( const mxArray *  in)

Here is the call graph for this function:

Here is the caller graph for this function:

DLLEXPORT bool mexCallMATLABsafe ( int  nlhs,
mxArray *  plhs[],
int  nrhs,
mxArray *  prhs[],
const char *  filename 
)

Here is the call graph for this function:

Here is the caller graph for this function:

DLLEXPORT Eigen::Matrix<Polynomiald, Eigen::Dynamic, Eigen::Dynamic> msspolyToEigen ( const mxArray *  msspoly)

Here is the call graph for this function:

Here is the caller graph for this function:

DLLEXPORT mxArray* mxGetFieldOrPropertySafe ( const mxArray *  array,
std::string const &  field_name 
)

Here is the call graph for this function:

Here is the caller graph for this function:

DLLEXPORT mxArray* mxGetFieldOrPropertySafe ( const mxArray *  array,
size_t  index,
std::string const &  field_name 
)

Here is the call graph for this function:

DLLEXPORT mxArray* mxGetFieldSafe ( const mxArray *  array,
std::string const &  field_name 
)

Here is the call graph for this function:

Here is the caller graph for this function:

DLLEXPORT mxArray* mxGetFieldSafe ( const mxArray *  array,
size_t  index,
std::string const &  field_name 
)
DLLEXPORT mxArray* mxGetPropertySafe ( const mxArray *  array,
std::string const &  field_name 
)

Here is the call graph for this function:

Here is the caller graph for this function:

DLLEXPORT mxArray* mxGetPropertySafe ( const mxArray *  array,
size_t  index,
std::string const &  field_name 
)
DLLEXPORT double* mxGetPrSafe ( const mxArray *  pobj)

Here is the caller graph for this function:

DLLEXPORT std::string mxGetStdString ( const mxArray *  array)

Here is the caller graph for this function:

DLLEXPORT std::vector<std::string> mxGetVectorOfStdStrings ( const mxArray *  array)

Here is the call graph for this function:

Here is the caller graph for this function:

DLLEXPORT void mxSetFieldSafe ( mxArray *  array,
size_t  index,
std::string const &  fieldname,
mxArray *  data 
)
DLLEXPORT void sizecheck ( const mxArray *  mat,
mwSize  M,
mwSize  N 
)

Here is the caller graph for this function:

DLLEXPORT mxArray* stdStringToMatlab ( const std::string &  str)

Here is the caller graph for this function:

mxArray* stdVectorToMatlab ( const std::vector< Scalar > &  vec)

Here is the call graph for this function:

Here is the caller graph for this function:

DLLEXPORT mwSize sub2ind ( mwSize  ndims,
const mwSize *  dims,
const mwSize *  sub 
)

Here is the caller graph for this function:

Eigen::Matrix<Eigen::AutoDiffScalar<Eigen::VectorXd>, Rows, Cols> taylorVarToEigen ( const mxArray *  taylor_var)

Here is the call graph for this function:

DLLEXPORT Eigen::Matrix<TrigPolyd, Eigen::Dynamic, Eigen::Dynamic> trigPolyToEigen ( const mxArray *  trigpoly)

Here is the call graph for this function:

Here is the caller graph for this function:

DLLEXPORT mxArray* vectorOfStdStringsToMatlab ( const std::vector< std::string > &  strs)

Here is the caller graph for this function: