made KeyInfoEntry into a struct

release/4.3a0
Frank Dellaert 2019-04-08 16:52:41 -04:00
parent 1a862c24a6
commit 60d07287c9
1 changed files with 5 additions and 18 deletions

View File

@ -32,8 +32,8 @@
namespace gtsam { namespace gtsam {
// Forward declarations // Forward declarations
struct KeyInfoEntry;
class KeyInfo; class KeyInfo;
class KeyInfoEntry;
class GaussianFactorGraph; class GaussianFactorGraph;
class Values; class Values;
class VectorValues; class VectorValues;
@ -109,27 +109,14 @@ public:
/** /**
* Handy data structure for iterative solvers * Handy data structure for iterative solvers
* key to (index, dimension, colstart) * key to (index, dimension, start)
*/ */
class GTSAM_EXPORT KeyInfoEntry: public boost::tuple<Key, size_t, Key> { struct GTSAM_EXPORT KeyInfoEntry {
size_t index, dim, start;
public:
typedef boost::tuple<Key, size_t, Key> Base;
KeyInfoEntry() { KeyInfoEntry() {
} }
KeyInfoEntry(size_t idx, size_t d, Key start) : KeyInfoEntry(size_t idx, size_t d, Key start) :
Base(idx, d, start) { index(idx), dim(d), start(start) {
}
size_t index() const {
return this->get<0>();
}
size_t dim() const {
return this->get<1>();
}
size_t colstart() const {
return this->get<2>();
} }
}; };