Loading...
Searching...
No Matches
Scatter.h
Go to the documentation of this file.
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* -------------------------------------------------------------------------- */
#pragma once
#include <gtsam/inference/Key.h>
#include <gtsam/base/FastMap.h>
#include <gtsam/dllexport.h>
namespace gtsam {
class GaussianFactorGraph;
class Ordering;
struct GTSAM_EXPORT SlotEntry {
Key key;
size_t dimension;
SlotEntry(Key _key, size_t _dimension) : key(_key), dimension(_dimension) {}
std::string toString() const;
friend bool operator<(const SlotEntry& p, const SlotEntry& q) {
return p.key < q.key;
}
static bool Zero(const SlotEntry& p) { return p.dimension==0;}
};
class Scatter : public FastVector<SlotEntry> {
public:
GTSAM_EXPORT Scatter() {}
GTSAM_EXPORT explicit Scatter(const GaussianFactorGraph& gfg);
GTSAM_EXPORT explicit Scatter(const GaussianFactorGraph& gfg, const Ordering& ordering);
GTSAM_EXPORT void add(Key key, size_t dim);
private:
iterator find(Key key);
};
} // \ namespace gtsam
FastMap.h
A thin wrapper around std::map that uses boost's fast_pool_allocator.
Key.h
gtsam::FastVector
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
FastVector is a type alias to a std::vector with a custom memory allocator.
Definition FastVector.h:33
gtsam
Global functions in a separate testing namespace.
Definition chartTesting.h:28
gtsam::Key
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:100
gtsam::Ordering
Definition Ordering.h:34
gtsam::GaussianFactorGraph
A Linear Factor Graph is a factor graph where all factors are Gaussian, i.e.
Definition GaussianFactorGraph.h:75
gtsam::Scatter::add
GTSAM_EXPORT void add(Key key, size_t dim)
Add a key/dim pair.
Definition Scatter.cpp:76
gtsam::Scatter::Scatter
GTSAM_EXPORT Scatter()
Default Constructor.
Definition Scatter.h:52