Duy-Nguyen Ta
0e278f81c6
remove Vectorize, simplify to just numpy.squeeze
2017-03-10 23:33:14 -05:00
Duy-Nguyen Ta
89bc31d703
fix comment
2017-03-10 23:28:26 -05:00
Duy-Nguyen Ta
dc7792d350
unify/rename functions: matlab_code and cython_wrapper to generate_xxxxx_wrapper
2017-03-10 23:27:29 -05:00
Duy-Nguyen Ta
b7efaf8c3f
special ctor signature to be used with cyCreateFromShared
...
so that calling the default ctor by mistake on a class without the default ctor will respond nicely with an exception instead of a seg-fault
2017-03-08 15:22:16 -05:00
Duy-Nguyen Ta
c9666a1b44
fix merge problem
...
Argument::isScalar() was moved to Qualified and should be checked via Argument::type
2017-03-08 15:15:37 -05:00
Duy-Nguyen Ta
c3b11af61e
remove unfinished cython-wrap test prototype
2017-03-08 10:05:35 -05:00
Duy-Nguyen Ta
d8e9271dd1
fix test
2017-03-08 10:03:27 -05:00
Duy-Nguyen Ta
68e0defa49
Merge branch 'develop' into feature/cython_wrapper
2017-03-08 09:51:15 -05:00
Duy-Nguyen Ta
5a8bd5afda
[cython] bypass a problem with no default constructor
...
Add this to support cyCreateFromShared, which needs to call the default Python constructor to construct the Python object before reassigning the internal shared ptr to the c++ object.
2017-03-06 01:18:19 -05:00
Duy-Nguyen Ta
ed8f7c5f82
[cython] remove copy constructor requirement
...
Using make_shared[C](other) instead of shared_ptr[C](new C(other)) to leverage the implicit default constructor inside C++
2017-03-06 01:06:53 -05:00
Simon Julier
6a109aca9b
Throw an exception rather than call exit.
2017-01-20 01:58:59 +00:00
Simon Julier
d8d7c5618a
Generate an error and exit if trying to wrap a non-const scalar reference.
2017-01-19 01:49:12 +00:00
Simon Julier
21aa7a2e85
Fixed unrwapping of scalar references.
2017-01-17 10:12:00 +00: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
126de1b8a4
revert usage info: interfacePath must be absolute.
2016-12-16 00:34:07 -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
0cef864663
__cinit__ --> __init__
2016-12-05 11:00:33 -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
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
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
2d527f0fc2
unfinished attempt to add typedef for matlab wrapper
2016-11-24 19:24:25 -05:00
Duy-Nguyen Ta
c13b964777
standardize names for classes with inner namespace
2016-11-24 19:22:44 -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
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
Duy-Nguyen Ta
acf3c9d259
proper overloading constructors
2016-11-16 17:51:03 -05:00
Duy-Nguyen Ta
dc185a6d30
support python print for classes with print_ function
2016-11-16 17:37:33 -05:00
Duy-Nguyen Ta
3f0304d067
more detailed comments
...
Cython/Python pxd/pyx class names and argument types are a mess... Hopefully these comments help clarify something.
2016-11-16 17:37:05 -05:00
Duy-Nguyen Ta
d38c51b533
collect typedefs of basic (non-class) types to treat them as basic types
2016-11-14 00:08:42 -05:00
Duy-Nguyen Ta
709417b36d
remove unused
2016-11-14 00:00:35 -05:00
Duy-Nguyen Ta
6cbd613b43
add typedefs to the list of validTypes
2016-11-13 23:59:56 -05:00
Duy-Nguyen Ta
a18f11097c
format
2016-11-13 23:58:11 -05:00
Chris Beall
9f9d7b4a09
Merged in crownequipment/gtsam/fix/removeBoostRegex (pull request #278 )
...
Removed the boost::regex include (not used) from the matlab wrapper & removed any linking to boost::regex
2016-09-20 07:59:37 -07:00
Duy-Nguyen Ta
f5691804ed
Use class name as ctor for static construction calls
...
Longer, but more conventional
2016-09-19 12:39:04 -04:00
Duy-Nguyen Ta
814abcb67c
print_() insteads of _print() (easier to type)
2016-09-19 12:37:03 -04:00
Duy-Nguyen Ta
a294c2ab11
simplify python constructor call
2016-09-16 11:43:25 -04:00
Duy-Nguyen Ta
547606e6c2
correct cython wrapper module name in pyx import
2016-09-14 07:45:26 -04:00
Duy-Nguyen Ta
435870ebf0
remove extra Xd of Eigen types in Argument and ReturnType
2016-09-14 07:44:38 -04:00
Duy-Nguyen Ta
892b9264a4
correct Eigency name for Eigen type
2016-09-13 21:20:08 -04:00
Duy-Nguyen Ta
2433cbd8e8
Remove copy constructor assumption. Manually add copy constructors. Remove dependency on default constructor (some like Optimizers and Marginals don't have the default constructor). Remove cyCreateFromValue. Ignore variable name when checking overload similarity.
2016-09-13 17:11:23 -04:00