Drake
|
#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"
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 double * | mxGetPrSafe (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< double > | matlabToEigenSparse (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) |
#define DLLEXPORT |
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 = "" |
||
) |
|
inline |
mxArray* eigenToMatlab | ( | const DerivedA & | m | ) |
mxArray* eigenToMatlabGeneral | ( | const Eigen::MatrixBase< Eigen::Matrix< Eigen::AutoDiffScalar< DerType >, RowsAtCompileTime, ColsAtCompileTime >> & | mat | ) |
mxArray* eigenToMatlabGeneral | ( | const Eigen::MatrixBase< Eigen::Matrix< TrigPolyd, RowsAtCompileTime, ColsAtCompileTime >> & | mat | ) |
mxArray* eigenToMatlabGeneral | ( | const Eigen::MatrixBase< Eigen::Matrix< double, RowsAtCompileTime, ColsAtCompileTime >> & | mat | ) |
DLLEXPORT mxArray* eigenToMatlabSparse | ( | Eigen::MatrixBase< Derived > const & | M, |
int & | num_non_zero | ||
) |
mxArray* eigenToMSSPoly | ( | const Eigen::Matrix< Polynomiald, _Rows, _Cols > & | poly | ) |
mxArray* eigenToTaylorVar | ( | const Eigen::MatrixBase< Derived > & | m, |
int | num_variables = Eigen::Dynamic |
||
) |
mxArray* eigenToTrigPoly | ( | const Eigen::Matrix< TrigPolyd, _Rows, _Cols > & | trigpoly_mat | ) |
DLLEXPORT void* getDrakeMexPointer | ( | const mxArray * | mx | ) |
DLLEXPORT bool isa | ( | const mxArray * | mxa, |
const char * | class_str | ||
) |
void matlabToCArrayOfArrays | ( | const mxArray * | source, |
double(&) | destination[Rows][Cols] | ||
) |
Eigen::Matrix<double, RowsAtCompileTime, ColsAtCompileTime> matlabToEigen | ( | const mxArray * | matlab_array | ) |
Eigen::Map<const Eigen::Matrix<double, Rows, Cols> > matlabToEigenMap | ( | const mxArray * | mex | ) |
const std::vector<T> matlabToStdVector | ( | const mxArray * | in | ) |
DLLEXPORT bool mexCallMATLABsafe | ( | int | nlhs, |
mxArray * | plhs[], | ||
int | nrhs, | ||
mxArray * | prhs[], | ||
const char * | filename | ||
) |
DLLEXPORT Eigen::Matrix<Polynomiald, Eigen::Dynamic, Eigen::Dynamic> msspolyToEigen | ( | const mxArray * | msspoly | ) |
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* mxGetFieldSafe | ( | const mxArray * | array, |
std::string const & | field_name | ||
) |
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 | ||
) |
DLLEXPORT mxArray* mxGetPropertySafe | ( | const mxArray * | array, |
size_t | index, | ||
std::string const & | field_name | ||
) |
DLLEXPORT std::string mxGetStdString | ( | const mxArray * | array | ) |
DLLEXPORT std::vector<std::string> mxGetVectorOfStdStrings | ( | const mxArray * | array | ) |
DLLEXPORT void mxSetFieldSafe | ( | mxArray * | array, |
size_t | index, | ||
std::string const & | fieldname, | ||
mxArray * | data | ||
) |
DLLEXPORT void sizecheck | ( | const mxArray * | mat, |
mwSize | M, | ||
mwSize | N | ||
) |
DLLEXPORT mxArray* stdStringToMatlab | ( | const std::string & | str | ) |
mxArray* stdVectorToMatlab | ( | const std::vector< Scalar > & | vec | ) |
DLLEXPORT mwSize sub2ind | ( | mwSize | ndims, |
const mwSize * | dims, | ||
const mwSize * | sub | ||
) |
Eigen::Matrix<Eigen::AutoDiffScalar<Eigen::VectorXd>, Rows, Cols> taylorVarToEigen | ( | const mxArray * | taylor_var | ) |
DLLEXPORT Eigen::Matrix<TrigPolyd, Eigen::Dynamic, Eigen::Dynamic> trigPolyToEigen | ( | const mxArray * | trigpoly | ) |
DLLEXPORT mxArray* vectorOfStdStringsToMatlab | ( | const std::vector< std::string > & | strs | ) |