Classes | Macros | Functions | Variables
matlab.h File Reference

header file to be included in MATLAB wrappers More...

#include <gtsam/base/Vector.h>
#include <gtsam/base/Matrix.h>
#include <gtsam/geometry/Point2.h>
#include <gtsam/geometry/Point3.h>
#include <gtsam/base/utilities.h>
#include <mex.h>
#include <list>
#include <set>
#include <sstream>
#include <streambuf>
#include <string>
#include <typeinfo>
Include dependency graph for matlab.h:

Go to the source code of this file.

Classes

class  mstream
 

Macros

#define GTSAM_MAGIC_GAUSSIAN
 
#define mxUINT32OR64_CLASS   mxUINT32_CLASS
 

Functions

void checkArguments (const string &name, int nargout, int nargin, int expected)
 
void checkScalar (const mxArray *array, const char *str)
 
mxArray * create_object (const std::string &classname, void *pointer, bool isVirtual, const char *rttiName)
 
void error (const char *str)
 
template<typename T >
T myGetScalar (const mxArray *array)
 
mxArray * scalar (mxClassID classid)
 
template<typename T >
T unwrap (const mxArray *array)
 
template<>
bool unwrap< bool > (const mxArray *array)
 
template<>
char unwrap< char > (const mxArray *array)
 
template<>
double unwrap< double > (const mxArray *array)
 
template<>
gtsam::Matrix unwrap< gtsam::Matrix > (const mxArray *array)
 
template<>
gtsam::Point2 unwrap< gtsam::Point2 > (const mxArray *array)
 
template<>
gtsam::Point3 unwrap< gtsam::Point3 > (const mxArray *array)
 
template<>
gtsam::Vector unwrap< gtsam::Vector > (const mxArray *array)
 
template<>
int unwrap< int > (const mxArray *array)
 
template<>
size_t unwrap< size_t > (const mxArray *array)
 
template<>
string unwrap< string > (const mxArray *array)
 
template<>
unsigned char unwrap< unsigned char > (const mxArray *array)
 
template<typename T >
T unwrap_enum (const mxArray *array)
 Unwrap from matlab array to C++ enum type. More...
 
template<typename Class >
Classunwrap_ptr (const mxArray *obj, const string &propertyName)
 
template<typename Class >
std::shared_ptr< Classunwrap_shared_ptr (const mxArray *obj, const string &propertyName)
 
template<typename Class >
mxArray * wrap (const Class &value)
 
template<>
mxArray * wrap< bool > (const bool &value)
 
template<>
mxArray * wrap< char > (const char &value)
 
template<>
mxArray * wrap< double > (const double &value)
 
template<>
mxArray * wrap< gtsam::Matrix > (const gtsam::Matrix &A)
 
template<>
mxArray * wrap< gtsam::Point2 > (const gtsam::Point2 &v)
 
template<>
mxArray * wrap< gtsam::Point3 > (const gtsam::Point3 &v)
 
template<>
mxArray * wrap< gtsam::Vector > (const gtsam::Vector &v)
 
template<>
mxArray * wrap< int > (const int &value)
 
template<>
mxArray * wrap< size_t > (const size_t &value)
 
template<>
mxArray * wrap< string > (const string &value)
 
template<>
mxArray * wrap< unsigned char > (const unsigned char &value)
 
template<typename T >
mxArray * wrap_enum (const T x, const std::string &classname)
 Wrap the C++ enum to Matlab mxArray. More...
 
mxArray * wrap_Matrix (const gtsam::Matrix &A)
 
template<typename Class >
mxArray * wrap_shared_ptr (std::shared_ptr< Class > shared_ptr, const std::string &matlabName, bool isVirtual)
 
mxArray * wrap_Vector (const gtsam::Vector &v)
 

Variables

static const std::uint64_t ptr_constructor_key
 

Detailed Description

header file to be included in MATLAB wrappers

Date
2008
Author
Frank Dellaert
Alex Cunningham
Andrew Melim
Richard Roberts

wrapping and unwrapping is done using specialized templates, see http://www.cplusplus.com/doc/tutorial/templates.html

Definition in file matlab.h.

Macro Definition Documentation

◆ GTSAM_MAGIC_GAUSSIAN

#define GTSAM_MAGIC_GAUSSIAN

Definition at line 51 of file matlab.h.

◆ mxUINT32OR64_CLASS

#define mxUINT32OR64_CLASS   mxUINT32_CLASS

Definition at line 58 of file matlab.h.

Function Documentation

◆ checkArguments()

void checkArguments ( const string &  name,
int  nargout,
int  nargin,
int  expected 
)

Definition at line 113 of file matlab.h.

◆ checkScalar()

void checkScalar ( const mxArray *  array,
const char *  str 
)

Definition at line 87 of file matlab.h.

◆ create_object()

mxArray* create_object ( const std::string &  classname,
void *  pointer,
bool  isVirtual,
const char *  rttiName 
)

Definition at line 430 of file matlab.h.

◆ error()

void error ( const char *  str)

Definition at line 78 of file matlab.h.

◆ myGetScalar()

template<typename T >
T myGetScalar ( const mxArray *  array)

Definition at line 293 of file matlab.h.

◆ scalar()

mxArray* scalar ( mxClassID  classid)

Definition at line 82 of file matlab.h.

◆ unwrap()

template<typename T >
T unwrap ( const mxArray *  array)

Definition at line 256 of file matlab.h.

◆ unwrap< bool >()

template<>
bool unwrap< bool > ( const mxArray *  array)

Definition at line 307 of file matlab.h.

◆ unwrap< char >()

template<>
char unwrap< char > ( const mxArray *  array)

Definition at line 314 of file matlab.h.

◆ unwrap< double >()

template<>
double unwrap< double > ( const mxArray *  array)

Definition at line 342 of file matlab.h.

◆ unwrap< gtsam::Matrix >()

template<>
gtsam::Matrix unwrap< gtsam::Matrix > ( const mxArray *  array)

Definition at line 401 of file matlab.h.

◆ unwrap< gtsam::Point2 >()

template<>
gtsam::Point2 unwrap< gtsam::Point2 > ( const mxArray *  array)

Definition at line 366 of file matlab.h.

◆ unwrap< gtsam::Point3 >()

template<>
gtsam::Point3 unwrap< gtsam::Point3 > ( const mxArray *  array)

Definition at line 383 of file matlab.h.

◆ unwrap< gtsam::Vector >()

template<>
gtsam::Vector unwrap< gtsam::Vector > ( const mxArray *  array)

Definition at line 349 of file matlab.h.

◆ unwrap< int >()

template<>
int unwrap< int > ( const mxArray *  array)

Definition at line 328 of file matlab.h.

◆ unwrap< size_t >()

template<>
size_t unwrap< size_t > ( const mxArray *  array)

Definition at line 335 of file matlab.h.

◆ unwrap< string >()

template<>
string unwrap< string > ( const mxArray *  array)

Definition at line 283 of file matlab.h.

◆ unwrap< unsigned char >()

template<>
unsigned char unwrap< unsigned char > ( const mxArray *  array)

Definition at line 321 of file matlab.h.

◆ unwrap_enum()

template<typename T >
T unwrap_enum ( const mxArray *  array)

Unwrap from matlab array to C++ enum type.

Template Parameters
TThe C++ enum type
Parameters
arrayMatlab mxArray

Definition at line 265 of file matlab.h.

◆ unwrap_ptr()

template<typename Class >
Class* unwrap_ptr ( const mxArray *  obj,
const string &  propertyName 
)

Definition at line 513 of file matlab.h.

◆ unwrap_shared_ptr()

template<typename Class >
std::shared_ptr<Class> unwrap_shared_ptr ( const mxArray *  obj,
const string &  propertyName 
)

Definition at line 501 of file matlab.h.

◆ wrap()

template<typename Class >
mxArray* wrap ( const Class value)

Definition at line 126 of file matlab.h.

◆ wrap< bool >()

template<>
mxArray* wrap< bool > ( const bool &  value)

Definition at line 156 of file matlab.h.

◆ wrap< char >()

template<>
mxArray* wrap< char > ( const char &  value)

Definition at line 140 of file matlab.h.

◆ wrap< double >()

template<>
mxArray* wrap< double > ( const double &  value)

Definition at line 180 of file matlab.h.

◆ wrap< gtsam::Matrix >()

template<>
mxArray* wrap< gtsam::Matrix > ( const gtsam::Matrix A)

Definition at line 227 of file matlab.h.

◆ wrap< gtsam::Point2 >()

template<>
mxArray* wrap< gtsam::Point2 > ( const gtsam::Point2 v)

Definition at line 201 of file matlab.h.

◆ wrap< gtsam::Point3 >()

template<>
mxArray* wrap< gtsam::Point3 > ( const gtsam::Point3 v)

Definition at line 207 of file matlab.h.

◆ wrap< gtsam::Vector >()

template<>
mxArray* wrap< gtsam::Vector > ( const gtsam::Vector v)

Definition at line 195 of file matlab.h.

◆ wrap< int >()

template<>
mxArray* wrap< int > ( const int value)

Definition at line 172 of file matlab.h.

◆ wrap< size_t >()

template<>
mxArray* wrap< size_t > ( const size_t value)

Definition at line 164 of file matlab.h.

◆ wrap< string >()

template<>
mxArray* wrap< string > ( const string &  value)

Definition at line 134 of file matlab.h.

◆ wrap< unsigned char >()

template<>
mxArray* wrap< unsigned char > ( const unsigned char &  value)

Definition at line 148 of file matlab.h.

◆ wrap_enum()

template<typename T >
mxArray* wrap_enum ( const T  x,
const std::string &  classname 
)

Wrap the C++ enum to Matlab mxArray.

Template Parameters
TThe C++ enum type
Parameters
xC++ enum
classnameMatlab enum classdef used to call Matlab constructor

Definition at line 236 of file matlab.h.

◆ wrap_Matrix()

mxArray* wrap_Matrix ( const gtsam::Matrix A)

Definition at line 212 of file matlab.h.

◆ wrap_shared_ptr()

template<typename Class >
mxArray* wrap_shared_ptr ( std::shared_ptr< Class shared_ptr,
const std::string &  matlabName,
bool  isVirtual 
)

Definition at line 487 of file matlab.h.

◆ wrap_Vector()

mxArray* wrap_Vector ( const gtsam::Vector v)

Definition at line 185 of file matlab.h.

Variable Documentation

◆ ptr_constructor_key

const std::uint64_t ptr_constructor_key
static
Initial value:
=
(std::uint64_t('G') << 56) |
(std::uint64_t('T') << 48) |
(std::uint64_t('S') << 40) |
(std::uint64_t('A') << 32) |
(std::uint64_t('M') << 24) |
(std::uint64_t('p') << 16) |
(std::uint64_t('t') << 8) |

Definition at line 64 of file matlab.h.

uint64_t
unsigned __int64 uint64_t
Definition: ms_stdint.h:95


gtsam
Author(s):
autogenerated on Thu Jun 13 2024 03:11:40