Commit Graph

9988 Commits (ff75d63876a407535cd45d02d89ee4b8d39b8de2)

Author SHA1 Message Date
Duy-Nguyen Ta ff75d63876 Removing constness causes problems with some no-default-constructor classes. Add dummy default constructors or expose them to public for Cython wrapper only.
Maybe a Cython bug? Both object and pointer object appeared next to each other in the generated cpp file, e.g.
   JointMarginal p0;
   JointMarginal* p1;
With correct constness, only the pointer object shows up.

Maybe related: https://groups.google.com/forum/#!topic/cython-users/HB5yxgKQ6wc
2016-12-19 18:24:02 -05:00
Duy-Nguyen Ta 189ce33e1d Support exceptions so ipython/python can catch and doesn't crash. Trade constness with exception since Cython doesn't allow both.
See: http://stackoverflow.com/questions/26904268/cython-both-const-and-except-in-c-method-declaration
2016-12-19 17:53:14 -05:00
Duy-Nguyen Ta d9d97c4bc7 Forward declare not only classes but their inheritance
This is needed for wrapping to Cython another project based on gtsam. The current scheme requires information about all parent classes. See updated comments in gtsam.h.
2016-12-19 17:47:30 -05:00
Duy-Nguyen Ta b55f7b1fa4 remove unused argument 2016-12-19 17:30:29 -05:00
Duy-Nguyen Ta 05a76164d3 forward declaration of ForwardDeclaration 2016-12-16 19:26:40 -05:00
Duy-Nguyen Ta da8a8a3bb0 remove unused argument 2016-12-16 19:24:49 -05:00
Duy-Nguyen Ta 7c5db5e90f update README 2016-12-16 14:33:08 -05:00
Duy-Nguyen Ta 7abcdb1b45 reorganize script folders: more reasonable packaging 2016-12-16 14:17:15 -05:00
Duy-Nguyen Ta 126de1b8a4 revert usage info: interfacePath must be absolute. 2016-12-16 00:34:07 -05:00
Duy-Nguyen Ta a7c1c89c7b update short test version 2016-12-16 00:27:32 -05:00
Duy-Nguyen Ta c34349bb7c Update README, showing how to wrap other projects using gtsam 2016-12-16 00:26:52 -05:00
Duy-Nguyen Ta 70552e9f6d improve cmake Cython wrapper scripts to be usable in other projects 2016-12-16 00:26:03 -05:00
Duy-Nguyen Ta f154be176f Major update to generate proper Cython pxd header files which could be included in other projects/modules
All cdef (class, functions, variables) declarations are moved to pxd. Implementations of those cdefs and normal Python def are in pyx.
See: http://cython.readthedocs.io/en/latest/src/userguide/sharing_declarations.html#sharing-extension-types
2016-12-16 00:23:45 -05:00
Duy-Nguyen Ta f3bf89b463 print for PreintegrationParams 2016-12-05 11:01:03 -05:00
Duy-Nguyen Ta 0cef864663 __cinit__ --> __init__ 2016-12-05 11:00:33 -05:00
Duy-Nguyen Ta 427d88ed5b test -> tests 2016-11-30 05:59:03 -05:00
Duy-Nguyen Ta 21fa3f07e9 basic experiments for testing the wrapper 2016-11-30 05:58:23 -05:00
Duy-Nguyen Ta 1e425536bb squeeze extra dims of numpy vectors so no need ravel. 2016-11-30 05:57:12 -05:00
Duy-Nguyen Ta 4439968f05 tabs to spaces 2016-11-30 05:56:07 -05:00
Duy-Nguyen Ta 6297b55f28 squeeze extra dims for numpy vectors 2016-11-30 05:52:47 -05:00
Duy-Nguyen Ta e37ce8eccb update readme 2016-11-29 12:10:08 -05:00
Duy-Nguyen Ta c7db489dcd update short test file 2016-11-29 11:58:34 -05:00
Duy-Nguyen Ta 5958b2397c resolve overloads via type checking, simplify Values's insert and update, more friendly Matrix and Vector utils
Keyword arguments are not needed anymore
2016-11-29 11:58:22 -05:00
Duy-Nguyen Ta f4e745ff0f add an include path to generated headers (e.g., config.h) 2016-11-29 10:38:20 -05:00
Duy-Nguyen Ta cf70960fc1 update readme format, delete install.sh 2016-11-25 04:14:00 -05:00
Duy-Nguyen Ta 6a0a1505a2 fix test 2016-11-25 04:05:52 -05:00
Duy-Nguyen Ta e407a42160 Merge branch 'develop' into feature/cython_wrapper
# Conflicts:
#	wrap/Module.cpp
2016-11-25 03:43:36 -05:00
Duy-Nguyen Ta 05dafa2334 update and rename TODO to README. Add basic installation and usage instructions. 2016-11-25 03:38:00 -05:00
Duy-Nguyen Ta 67787c5d39 fix variable names. They are important to resolve overloads! 2016-11-25 03:35:45 -05:00
Duy-Nguyen Ta c54753d106 now can build and install with cmake 2016-11-25 02:27:12 -05:00
Duy-Nguyen Ta 003f698503 remove obsolete tests 2016-11-24 21:53:44 -05:00
Duy-Nguyen Ta 2ce6d11bca a mini version for testing 2016-11-24 19:51:02 -05:00
Duy-Nguyen Ta a21dd0e471 put generated files in subfolder, run unittests by default 2016-11-24 19:48:05 -05:00
Duy-Nguyen Ta a4f28bc7fb Port all matlab tests to python. All passed. 2016-11-24 19:29:42 -05:00
Duy-Nguyen Ta 9fe804bc1a replace matlab.h in gtsam.h for matlab wrapper by its new file nonlinear/utilities.h 2016-11-24 19:26:11 -05:00
Duy-Nguyen Ta 2d527f0fc2 unfinished attempt to add typedef for matlab wrapper 2016-11-24 19:24:25 -05:00
Duy-Nguyen Ta e73d8a9742 add missing constructors and copy constructors 2016-11-24 19:23:22 -05:00
Duy-Nguyen Ta c13b964777 standardize names for classes with inner namespace 2016-11-24 19:22:44 -05:00
Duy-Nguyen Ta 0d68f42700 update todo 2016-11-23 14:24:05 -05:00
Duy-Nguyen Ta 5c5cc65951 bring cython gtsam.h closer to the original version for matlab 2016-11-23 14:22:52 -05:00
Duy-Nguyen Ta 88b626a0dc not needed anymore: casting is now done in cython 2016-11-23 14:22:12 -05:00
Duy-Nguyen Ta d772e52512 move matlab.h, containing matlab ultility functions, to nonlinear/utilities.h so it can be installed properly and can be used with the cython wrapper 2016-11-22 17:41:59 -05:00
Duy-Nguyen Ta 6ef6457e51 support global function overloads 2016-11-22 17:32:48 -05:00
Duy-Nguyen Ta 338c73669e support global functions (no overload) 2016-11-22 17:09:35 -05:00
Duy-Nguyen Ta 74f80fea4f [refactor] more understandable function names
Clearing confusions between pxd and pyx classes and objects!
2016-11-22 12:13:33 -05:00
Duy-Nguyen Ta 52a85f23f8 fix bugs on returned values 2016-11-21 17:14:30 -05:00
Duy-Nguyen Ta 7d8992c00a update TODO 2016-11-21 09:29:59 -05:00
Duy-Nguyen Ta fbcb9041f2 big refactoring, support method/static method overloading 2016-11-20 09:24:43 -05:00
Duy-Nguyen Ta fe855c9cab fix white spaces 2016-11-18 11:01:02 -05:00
Duy-Nguyen Ta 9f58d21030 support dynamic cast from all parents/virtual base 2016-11-18 11:00:15 -05:00