From 0c149b0ccab2614fe55d8517386f8a5d3272850d Mon Sep 17 00:00:00 2001 From: Duy-Nguyen Ta Date: Tue, 13 Sep 2016 16:21:51 -0400 Subject: [PATCH] add python version for getA/getb as cython can't convert constABlock/BVector to Matrix/Vector automatically. --- gtsam/linear/JacobianFactor.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtsam/linear/JacobianFactor.h b/gtsam/linear/JacobianFactor.h index 14ff46241..fe354b0bb 100644 --- a/gtsam/linear/JacobianFactor.h +++ b/gtsam/linear/JacobianFactor.h @@ -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()); }