gtsam/wrap
Alex Cunningham 61d05813ff Library now builds and all tests run with cmake 2011-12-14 02:24:21 +00:00
..
tests Changed namespace mechanism in wrap to "using namespace gtsam;" inside gtsam.h 2011-12-09 20:29:47 +00:00
Argument.cpp Cleanup in wrap 2011-12-11 21:09:07 +00:00
Argument.h Cleanup in wrap 2011-12-11 21:09:07 +00:00
CMakeLists.txt Library now builds and all tests run with cmake 2011-12-14 02:24:21 +00:00
Class.cpp Cleanup in wrap 2011-12-11 21:09:07 +00:00
Class.h Cleanup in wrap 2011-12-11 21:09:07 +00:00
Constructor.cpp Cleanup in wrap 2011-12-11 21:09:07 +00:00
Constructor.h Cleanup in wrap 2011-12-11 21:09:07 +00:00
Makefile.am Changed namespace mechanism in wrap to "using namespace gtsam;" inside gtsam.h 2011-12-09 20:29:47 +00:00
Method.cpp Cleanup in wrap 2011-12-11 21:09:07 +00:00
Method.h Cleanup in wrap 2011-12-11 21:09:07 +00:00
Module.cpp Cleanup in wrap 2011-12-11 21:09:07 +00:00
Module.h Cleanup in wrap 2011-12-11 21:09:07 +00:00
README Added static function parsing to wrap, included Expmap/Logmap in geometric objects. Static functions appear to still crash matlab, however. 2011-12-02 02:32:18 +00:00
ReturnValue.cpp Cleanup in wrap 2011-12-11 21:09:07 +00:00
ReturnValue.h Cleanup in wrap 2011-12-11 21:09:07 +00:00
StaticMethod.cpp Cleanup in wrap 2011-12-11 21:09:07 +00:00
StaticMethod.h Cleanup in wrap 2011-12-11 21:09:07 +00:00
matlab.h wrap: fixed errors in static function matlab codegen, added mechanism to allow for returning classes without shared_ptr 2011-12-07 03:05:30 +00:00
pop_actor.h Parsing for namespaces now works in all tests 2011-12-08 20:51:08 +00:00
utilities.cpp Cleanup in wrap 2011-12-11 21:09:07 +00:00
utilities.h Cleanup in wrap 2011-12-11 21:09:07 +00:00
wrap.cpp Changed namespace mechanism in wrap to "using namespace gtsam;" inside gtsam.h 2011-12-09 20:29:47 +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