Drake
drakeMexUtil.cpp File Reference
#include "drake/util/drakeMexUtil.h"
#include <stdexcept>
#include "drake/common/drake_assert.h"
Include dependency graph for drakeMexUtil.cpp:

Functions

bool isa (const mxArray *mxa, const char *class_str)
 
bool mexCallMATLABsafe (int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[], const char *filename)
 
mxArray * createDrakeMexPointer (void *ptr, const std::string &name, int type_id, int num_additional_inputs, mxArray *delete_fcn_additional_inputs[], const std::string &subclass_name, const std::string &mex_function_name_prefix)
 
void * getDrakeMexPointer (const mxArray *mx)
 
Eigen::SparseMatrix< doublematlabToEigenSparse (const mxArray *mex)
 
std::string mxGetStdString (const mxArray *array)
 
std::vector< std::string > mxGetVectorOfStdStrings (const mxArray *array)
 
mxArray * stdStringToMatlab (const std::string &str)
 
mxArray * vectorOfStdStringsToMatlab (const std::vector< std::string > &strs)
 
doublemxGetPrSafe (const mxArray *pobj)
 
mxArray * mxGetPropertySafe (const mxArray *array, std::string const &field_name)
 
mxArray * mxGetPropertySafe (const mxArray *array, size_t index, std::string const &field_name)
 
mxArray * mxGetFieldSafe (const mxArray *array, std::string const &field_name)
 
mxArray * mxGetFieldSafe (const mxArray *array, size_t index, std::string const &field_name)
 
void mxSetFieldSafe (mxArray *array, size_t index, std::string const &fieldname, mxArray *data)
 
mxArray * mxGetFieldOrPropertySafe (const mxArray *array, std::string const &field_name)
 
mxArray * mxGetFieldOrPropertySafe (const mxArray *array, size_t index, std::string const &field_name)
 
template<typename T >
const std::vector< T > matlabToStdVector (const mxArray *in)
 
template<>
DLLEXPORT const std::vector< doublematlabToStdVector< double > (const mxArray *in)
 
DLLEXPORT Matrix< Polynomiald, Dynamic, Dynamic > msspolyToEigen (const mxArray *msspoly)
 
DLLEXPORT Eigen::Matrix< TrigPolyd, Eigen::Dynamic, Eigen::Dynamic > trigPolyToEigen (const mxArray *trigpoly)
 
mwSize sub2ind (mwSize ndims, const mwSize *dims, const mwSize *sub)
 
void sizecheck (const mxArray *mat, mwSize M, mwSize N)
 
template<typename Derived >
mxArray * eigenToMatlabSparse (MatrixBase< Derived > const &M, int &num_non_zero)
 
template DLLEXPORT mxArray * eigenToMatlabSparse (MatrixBase< MatrixXd > const &, int &)
 
template DLLEXPORT mxArray * eigenToMatlabSparse (MatrixBase< Map< MatrixXd >> const &, int &)
 
template DLLEXPORT const std::vector< int > matlabToStdVector< int > (const mxArray *in)
 
template DLLEXPORT const std::vector< Eigen::Index > matlabToStdVector< Eigen::Index > (const mxArray *in)
 
template DLLEXPORT const std::vector< bool > matlabToStdVector< bool > (const mxArray *in)
 

Function Documentation

mxArray* createDrakeMexPointer ( void *  ptr,
const std::string &  name,
int  type_id,
int  num_additional_inputs,
mxArray *  delete_fcn_additional_inputs[],
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:

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

Here is the call graph for this function:

Here is the caller graph for this function:

template DLLEXPORT mxArray* eigenToMatlabSparse ( MatrixBase< MatrixXd > const &  ,
int &   
)
template DLLEXPORT mxArray* eigenToMatlabSparse ( MatrixBase< Map< MatrixXd >> const &  ,
int &   
)
void* getDrakeMexPointer ( const mxArray *  mx)

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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:

template DLLEXPORT const std::vector<bool> matlabToStdVector< bool > ( const mxArray *  in)

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

template DLLEXPORT const std::vector<Eigen::Index> matlabToStdVector< Eigen::Index > ( const mxArray *  in)
template DLLEXPORT const std::vector<int> matlabToStdVector< int > ( const mxArray *  in)

Here is the caller graph for this function:

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 Matrix<Polynomiald, Dynamic, Dynamic> msspolyToEigen ( const mxArray *  msspoly)

Here is the call graph for this function:

Here is the caller graph for this function:

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:

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

Here is the call graph for this function:

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:

mxArray* mxGetFieldSafe ( const mxArray *  array,
size_t  index,
std::string const &  field_name 
)
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:

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

Here is the caller graph for this function:

std::string mxGetStdString ( const mxArray *  array)

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller 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:

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

Here is the caller graph for this function: