Frank Dellaert
b9f080456c
Catch exception by value
2018-10-08 22:54:48 -04:00
Frank Dellaert
9c3949f738
Added virtual destructors
2018-09-27 00:23:17 -04:00
Frank Dellaert
61241ee9ff
fixed expected wrapper file
2017-12-02 22:14:56 -08:00
Frank Dellaert
4188a739ec
Fixed overloaded methods/constructors
2017-12-02 18:43:18 -08:00
Duy-Nguyen Ta
7ecdbd5908
update expected result for cython wrap test
2017-08-28 14:12:15 -04:00
Duy-Nguyen Ta
d23b5e4cfd
only catch AssertionError exceptions when handling overloads, so that other C++ exceptions can be raised correctly
2017-08-25 11:18:16 -07:00
Duy-Nguyen Ta
da5d3e303c
update expected outputs for cython wrapper unittests
2017-08-15 13:46:32 -04:00
dellaert
c5a0f1a839
Undo unrelated changes
2017-08-06 17:42:20 -07:00
dellaert
3bbea0f301
Make pxd a bit nicer to read
2017-08-06 17:26:12 -07:00
dellaert
905aac29f8
Only define as many return values as needed
2017-08-06 17:15:47 -07:00
dellaert
81c15d950a
Removed kwargs overhead for overloaded methods
2017-08-06 16:53:04 -07:00
dellaert
d752c9e249
Re-wrote constructor overloading logic which saves a lot of overhead
2017-08-06 14:58:23 -07:00
dellaert
2374347e69
Make internal, overloaded static methods cdefs to avoid call code/overhead
2017-08-06 13:25:54 -07:00
dellaert
6068166d2b
Moved wrapper class signature to Class.cpp
2017-08-06 12:21:26 -07:00
dellaert
74a33ff222
Re-structured argument overloading to call a common function
2017-08-06 11:07:13 -07:00
Duy-Nguyen Ta
82531c561f
clonedEigency --> gtsam_eigency. Update readme.
2017-07-28 15:26:19 -04:00
Duy-Nguyen Ta
5ff6a4e397
update expected cython wrap test output
2017-07-27 22:32:53 -04:00
Duy-Nguyen Ta
c0dd740d12
correct indentation for __str__
2017-07-27 22:32:27 -04:00
Duy-Nguyen Ta
742097aed0
eigency --> clonedEigency. Fixing bugs and improve eigency build.
2017-07-27 22:26:53 -04:00
Duy-Nguyen Ta
b1071b08a0
redirect stdcout to a stringstream so Python __str__() can properly return a string after calling the c++ print function
...
This is to avoid a printing issue in some Python's IDE when __str__() is called to update objects' values in Debug mode.
2017-07-25 16:32:26 -04:00
dellaert
c8dec5d8dc
Small changes in comments and docs
2017-05-20 12:23:41 -07:00
Duy-Nguyen Ta
a8d363c347
update expected pyx
2017-03-21 03:52:01 -04:00
Duy-Nguyen Ta
869dc811b0
graceful dynamic cast failures
2017-03-21 02:34:04 -04:00
Duy-Nguyen Ta
e624b6fe72
don't change matlab's generated filename (gtsam_wrapper), only cmake targets (to gtsam_matlab_wrapper)
2017-03-18 22:01:24 -04:00
Duy-Nguyen Ta
0da506b3a9
change gtsam_wrapper --> gtsam_matlab_wrapper
2017-03-18 20:32:25 -04:00
Duy-Nguyen Ta
ee75faa0df
test cython wrapper's generated files
2017-03-18 18:35:28 -04:00
Duy-Nguyen Ta
e3918da95c
update test to comply with a cython wrapper's requirement: need an include for every class.
2017-03-18 18:33:01 -04:00
Duy-Nguyen Ta
2146aa140c
default value for cython extra imports
2017-03-18 18:30:44 -04:00
Duy-Nguyen Ta
07b1bbfe7f
remove namespace requirement for cython wrapper
...
Only for unittesting wrap geometry.h, not yet tested in real python/cython
2017-03-18 18:29:53 -04:00
Duy-Nguyen Ta
42deeb7bf0
fix/update matlab wrapper tests when wrap serialization option is off
2017-03-18 18:26:21 -04:00
Duy-Nguyen Ta
16a1643d17
gracefully rasing exception when trying to create obj of a class with no constructor
2017-03-15 22:47:14 -04:00
Duy-Nguyen Ta
52f54d07bd
remove blank lines
2017-03-15 22:45:48 -04:00
Duy-Nguyen Ta
c52f54221e
update testWrap to call new function names
2017-03-15 17:03:13 -04:00
Duy-Nguyen Ta
6bf7ea23cf
convert numpy input params to dtype float and order 'F' automatically
...
using numpy.astype(...). No copy if the params are already in the correct dtype and storage order.
For a function
f(Matrix A, Matrix B),
simply wrapping it to pyx as
f(A.astype(float, order='F', copy=False), B.astype(float, order='F', copy=False))
won't work.
It produces a strange side-effect that the content of A is overwritten by B and the two inputs are the same (data address) inside the function!
This is because Cython decreases the ref count for the temporary variable resulted from A.astype(...) before generates the wrap for B.astype(...).
Hence, the A.astype temp var is probably reused for B.astype, and they were pointing to the same data address.
For that reason, we have to go a longer route and wrap it as:
A = A.astype(float, order='F', copy=False)
B = B.astype(float, order='F', copy=False)
f(A, B)
For future ref., here is a sample of the wrongly generated code that wraps the JacobianFactor constructor:
Jacobian(Key i1, Matrix A1, Key i2, Matrix A2, Vector b, noiseModel::Diagonal model)
Wrongly wrapped pyx code:
self.shared_CJacobianFactor_ = shared_ptr[CJacobianFactor](new CJacobianFactor(i1, <MatrixXd>(Map[MatrixXd](A1.astype(float, order='F',copy=False)), i2, <MatrixXd>(Map[MatrixXd](A2.astype(float, order='F', copy=False)), <VectorXd>(Map[VectorXd](b.astype(float, order='F', copy=False))), model.shared_CnoiseModel_Diagonal_))
The problematic Cython generated CPP code with a comment on the problematic line:
/////////////////////////////////////////
// WRONG VERSION
/////////////////////////////////////////
__pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_A1), __pyx_n_s_astype); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_12);
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
__Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyFloat_Type)));
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(0, 2107, __pyx_L1_error)
if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_copy, Py_False) < 0) __PYX_ERR(0, 2107, __pyx_L1_error)
__pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2107, __pyx_L1_error)
try {
__pyx_t_14 = eigency::Map<Eigen::MatrixXd> (((PyArrayObject *)__pyx_t_13));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 2107, __pyx_L1_error)
}
///////////////////////////////////////////////
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; //<------- Problematic line!!! Killing this will result in the correct result!
///////////////////////////////////////////////
__pyx_t_13 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_A2), __pyx_n_s_astype); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_13);
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
__Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)(&PyFloat_Type)));
__pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(0, 2107, __pyx_L1_error)
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_copy, Py_False) < 0) __PYX_ERR(0, 2107, __pyx_L1_error)
__pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2107, __pyx_L1_error)
try {
__pyx_t_15 = eigency::Map<Eigen::MatrixXd> (((PyArrayObject *)__pyx_t_12));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 2107, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_b), __pyx_n_s_astype); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_12);
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
__Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyFloat_Type)));
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_5);
if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(0, 2107, __pyx_L1_error)
if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_copy, Py_False) < 0) __PYX_ERR(0, 2107, __pyx_L1_error)
__pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (!(likely(((__pyx_t_13) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_13, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2107, __pyx_L1_error)
try {
__pyx_t_16 = eigency::Map<Eigen::VectorXd> (((PyArrayObject *)__pyx_t_13));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 2107, __pyx_L1_error)
}
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
try {
__pyx_t_17 = new gtsam::JacobianFactor(__pyx_v_i1, ((Eigen::MatrixXd)__pyx_t_14), __pyx_v_i2, ((Eigen::MatrixXd)__pyx_t_15), ((Eigen::VectorXd)__pyx_t_16), __pyx_v_model->shared_CnoiseModel_Diagonal_);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 2107, __pyx_L1_error)
}
__pyx_v_self->shared_CJacobianFactor_ = boost::shared_ptr<gtsam::JacobianFactor> (__pyx_t_17);
2017-03-15 13:47:11 -04:00
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
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
Duy-Nguyen Ta
d65d87072b
use __Create__ as name for "constructors" instead of the object name
...
so we call : Class.__Create__(...) to create a python object, instead of Class.Class(...) which seems duplicated and complicated if Class is long, e.g. "mEstimator_noiseModel_GemanMcClure"
2016-09-09 16:39:12 -04:00
Duy-Nguyen Ta
1e84da1cfa
pyx: add constructors and fixing inheritance
2016-09-09 15:52:44 -04:00
Duy-Nguyen Ta
2d3d6d99f9
standardize function name to emit_cython_[pxd/pyx]. Remove first level namespace from Cython object names.
...
Examples: gtsam_Point3 --> Point3, gtsam_noiseModel_Base --> noiseModel_Base
2016-09-09 12:01:51 -04:00
Duy-Nguyen Ta
f137ae1d9c
test wrapping JacobianFactor
2016-09-09 11:59:28 -04:00
Duy-Nguyen Ta
16345e4ba1
revert changes in methods_, handle template methods for Cython pxd in a less instrusive way
2016-09-09 07:49:42 -04:00
Duy-Nguyen Ta
b9880d4257
emit template class to Cython pxd with test
...
Cython allows template class.
2016-09-09 07:28:13 -04:00
Duy-Nguyen Ta
40da298f68
emit methods to pxd, change the way template methods are handled
...
pxd allows template methods, whereas the current scheme instantiates/expands all template methods and add them to the same methods_ container. The new scheme treats them all separately: nontemplated methods in methods_, template methods in templateMethods_, and template methods after instantiation in expandedTemplateMethods_.
2016-09-09 07:26:11 -04:00
Duy-Nguyen Ta
6e96e095f3
remove unused function
2016-09-09 07:18:58 -04:00
Duy-Nguyen Ta
93696c0245
test pxd ReturnValue and ReturnType
2016-09-09 07:17:12 -04:00
Duy-Nguyen Ta
b73d063dbd
bug fix
2016-09-09 07:16:29 -04:00
Duy-Nguyen Ta
f72448b624
pxd returntype
2016-09-09 07:10:32 -04:00
Duy-Nguyen Ta
86405dbb48
pxd return value
2016-09-09 07:10:04 -04:00
Duy-Nguyen Ta
2c52928d57
pxd staticmethod
2016-09-09 07:09:39 -04:00
Duy-Nguyen Ta
ecde851d8c
[inprogress] cython wrapper
2016-09-08 13:33:32 -04:00
Ryan Estep
d1cdafa3f5
Removed the boost::regex include (not used) from the matlab wrapper & removed any linking to boost::regex
2016-08-29 13:03:46 +12:00
Carl Morgan
01b3bf4038
boost::spirit assign_a fixes to use non-literials
2016-08-11 14:23:26 +12:00
Jing Dong
16145f5e01
fix ambiguous type uint64_t and int64_t in matlab toolbox, happens on gcc 4.8 and boost 1.50
2016-06-14 15:15:14 -04:00
dellaert
72fe66d468
Removed headers
2016-05-22 14:22:36 -07:00
yao
dc00eb4f87
Reverted the files in which the #include <boost/foreach.hpp> was removed.
2016-05-21 17:51:04 -04:00
Yao Chen
d1ea1015a9
Replaced BOOSE_FOREACH with for in wrap folder. Tested the changed code locally: successful.
2016-05-20 21:41:18 -04:00
dellaert
7fd838611e
Fixed typo
2016-02-11 23:27:09 -08:00
Frank
2060b09a2b
Avoid calling default constructors and/or vector
2016-02-11 19:03:11 -08:00
dellaert
5b581a36c9
Made tests succeed, added templated Vector templates
2016-02-07 20:34:16 -08:00
dellaert
699943d632
Changes to wrap from FixedValues branch/PR. Since unrelated to that PR and useful for OptionalJacobian wrapping in py_wrap, made this a separate PR.
2016-02-07 20:33:48 -08:00
Frank
72d2d77e21
Fixed warning
2015-05-12 14:23:51 -07:00
Frank
4ba329c23b
Fixed many warnings on Ubuntu
2015-05-12 13:46:24 -07:00
dellaert
c29e6ca2e7
Fixed subtle (imperative!) bug where a forward declaration was partially parsed as a class, only then as a forward declaration.
2014-12-19 16:19:02 +01:00
dellaert
9f2e6562c2
test virtual, cleaned up other test
2014-12-19 15:40:21 +01:00
dellaert
aaba18c61d
Added expected files.
2014-12-19 15:39:34 +01:00
lvzhaoyang
bcfcf8be8e
fix gtsam wrapper for priorFactorVector
2014-12-12 11:34:34 -05:00
lvzhaoyang
87ae297dad
just make sure it can compile and run. Will come back to fix it
2014-12-06 23:13:09 -05:00
lvzhaoyang
e49c9fa100
1. remove LieVector in IMUKittiExampleGPS.m 2. Add tests the priorFactor in matlab 3. template substition tests in testsClass.cpp
2014-12-04 13:28:20 -05:00
dellaert
afebf2087f
Small problem w virtual
2014-12-02 14:12:22 +01:00
dellaert
41d2783beb
GlobalFunctionGrammar done and used
2014-12-02 13:49:25 +01:00
dellaert
a8de6c4dc3
Moved to header
2014-12-02 13:41:46 +01:00
dellaert
60d7b80055
Successful global function parser
2014-12-02 13:30:52 +01:00
dellaert
04af29f726
Moved typedef
2014-12-02 13:30:36 +01:00
dellaert
3606a1ab68
killed old stuff
2014-12-02 13:30:21 +01:00
dellaert
b8d7516e93
Successful use of ClassGrammar in Module.cpp
2014-12-02 13:12:42 +01:00
dellaert
0e48e2ff0b
Moved to header
2014-12-02 12:41:35 +01:00
dellaert
f035b12f46
Successful parse!
2014-12-02 12:34:54 +01:00
dellaert
12791737e0
First non-passing grammar test
2014-12-02 11:41:09 +01:00
dellaert
6981a1229d
Removed mutable
2014-12-02 11:40:50 +01:00
dellaert
6bdba5c17f
Same change for TypeList
2014-12-02 11:27:41 +01:00
dellaert
f00f62d89f
Much better way of handling local variables in grammar
2014-12-02 11:24:53 +01:00
dellaert
9bb336ac2b
Should be more compatible with earlier Boost versions
2014-12-01 22:29:27 +01:00
dellaert
78b1cd271a
Fixed testClass unit tests
2014-12-01 20:34:05 +01:00
dellaert
aceeb2037b
Template tightening
2014-12-01 20:29:35 +01:00