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
Duy-Nguyen Ta
450a652bcf
pxd hack: always add copy constructor by default
2016-09-12 18:47:04 -04:00
Duy-Nguyen Ta
3115f9b671
enable all Key containers
2016-09-12 18:46:41 -04:00
Duy-Nguyen Ta
53dbe25c50
Cython pxd: putting template instantiations at the correct place right after a template class
2016-09-12 18:36:45 -04:00
Duy-Nguyen Ta
6044bffd8a
handle Key by adding noninstantiating normal typedef rule. Fix copy constructor in template classes: using This.
2016-09-12 18:17:47 -04:00
Duy-Nguyen Ta
06ab94766c
improve inherited method removal
...
Checking nontemplateMethods_ against parent's methods_ because:
1. Only nontemplateMethods_ are serialized to Cython's pxd, which doesn't like duplicate methods
2. Parent's methods_ list has every methods inherited from grand and grand-grand parents, etc., so we don't need to check higher levels.
Also refactor to reduce nested code
2016-09-12 12:38:04 -04:00
Duy-Nguyen Ta
e35f0c3f50
remove inherited functions for Cython classes. Testing HessianFactor with debug info...
2016-09-12 11:05:28 -04:00
Duy-Nguyen Ta
1b04c6713b
handle "This". Wrap all geometry
2016-09-11 18:14:19 -04:00
Duy-Nguyen Ta
fabfac65f4
unify and simplify function call in Method and StaticMethod
2016-09-11 17:14:06 -04:00
Duy-Nguyen Ta
63a5d1e15a
wrap pair. Improve return.
2016-09-11 16:40:09 -04:00
Duy-Nguyen Ta
b91a7d368d
fix Vector/Matrix and Map[Vector/Matrix] ambiguity.
...
That also fixes the problem of function templated on Matrix/Vector
2016-09-11 08:24:45 -04:00
Duy-Nguyen Ta
cf51c85391
fix testWrap: revert experimental changes
2016-09-10 22:18:53 -04:00
Duy-Nguyen Ta
948e6262db
first version ever compiled.
...
... Not without some changes:
- add traits<size_t> in Key.h
- add these to JacobianFactor:
explicit JacobianFactor(const Eigen::Map<Vector>& b_in);
Vector py_getb() { return getb(); }
Matrix py_getA() { return getA(); }
---------
... Remaining corner cases:
☐ Eigency: Map[] to Block
☐ Eigency: ambiguous call: A(const T&) A(const Vector& v) and Eigency A(Map[Vector]& v)
☐ Fix return properly
☐ handle pair
☐ Fix method template of Vector/Matrix: template argument is [Vector] while arugment is Map[Vector]
☐ Constructor: generate default constructor? (hack: if it's serializable?)
☐ Constructor: ambiguous construct from Vector/Matrix
☐ Key and size_t: traits<size_t> doesn't exist
☐ [Nice to have] Auto delete duplicate methods in derived class
2016-09-10 19:50:12 -04:00
Duy-Nguyen Ta
3352aed2f7
call new function name
2016-09-10 19:45:50 -04:00
Duy-Nguyen Ta
2496de85a9
check if default constructor exists. Autogenerate copy constructor by default
2016-09-10 19:44:53 -04:00
Duy-Nguyen Ta
8944f02401
add headers, small refactor, test FastContainers
2016-09-09 22:28:15 -04:00
Duy-Nguyen Ta
d719b9b7ae
ctypedefs for all instantiated classes
2016-09-09 21:50:55 -04:00
Duy-Nguyen Ta
10f510119a
pyx class methods with arguments/return type casting
2016-09-09 18:37:48 -04:00
Duy-Nguyen Ta
56c0d2a65e
pyx wrapper for static methods
2016-09-09 16:39:47 -04:00