add python version for getA/getb as cython can't convert constABlock/BVector to Matrix/Vector automatically.

release/4.3a0
Duy-Nguyen Ta 2016-09-13 16:21:51 -04:00
parent 450a652bcf
commit 0c149b0cca
1 changed files with 2 additions and 0 deletions

View File

@ -268,9 +268,11 @@ namespace gtsam {
/** Get a view of the A matrix, not weighted by noise */
constABlock getA() const { return Ab_.range(0, size()); }
Matrix py_getA() const { return getA(); }
/** Get a view of the r.h.s. vector b (non-const version) */
BVector getb() { return Ab_(size()).col(0); }
Vector py_getb() const { return getb(); }
/** Get a view of the A matrix for the variable pointed to by the given key iterator (non-const version) */
ABlock getA(iterator variable) { return Ab_(variable - begin()); }