gtsam/wrap
Richard Roberts 3b139cbae2 (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
..
tests (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
Argument.cpp (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
Argument.h (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
Class.cpp (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
Class.h (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
Constructor.cpp (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
Constructor.h (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
Makefile.am (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
Method.cpp (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
Method.h (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
Module.cpp (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
Module.h (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
README (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
ReturnValue.cpp (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
ReturnValue.h (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
StaticMethod.cpp (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
StaticMethod.h (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
matlab.h (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
pop_actor.h (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
utilities.cpp (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
utilities.h (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00
wrap.cpp (in branch) Merged from trunk r7960-r8057 2011-12-12 16:03:52 +00:00

README

Frank Dellaert
October 2011

The wrap library wraps the GTSAM library into a MATLAB toolbox.

It was designed to be more general than just wrapping GTSAM, but a small amount of 
GTSAM specific code exists in matlab.h, the include file that is included by the
mex files. In addition, the current makefile (Oct 11) is GTSAM specific.

The classes and methods to be warpped are specified in gtsam.h
This tool will not wrap arbitrary methods. Please read comments in matlab.h
Some good things to know:

OBJECT CREATION
- Classes are created by special constructors, e.g., new_GaussianFactorGraph_.cpp.
	These constructors are called from the MATLAB class @GaussianFactorGraph.
	new_GaussianFactorGraph_ calls wrap_constructed in matlab.h, see documentation there
	
METHOD (AND CONSTRUCTOR) ARGUMENTS
- Simple argument types of methods, such as "double", will be converted in the
  mex warppers by calling unwrap<double>, defined in matlab.h
- Vector and Matrix arguments are normally passed by reference in GTSAM, but
  in gtsam.h you need to pretend they are passed by value, to trigger the 
  generation of the correct conversion routines unwrap<Vector> and unwrap<Matrix>
- passing classes as arguments works, provided they are passed by reference.
	This triggers a call to unwrap_shared_ptr
- GTSAM specific: keys will be cast automatically from strings via GTSAM_magic. This
  allows us to not have to declare all key types in MATLAB. Just replace key arguments with
  the (non-const, non-reference) string type