Renamed ListOf to something more descriptive

release/4.3a0
Frank Dellaert 2023-01-08 21:22:25 -08:00
parent fa3a8103c5
commit 1e99f68f70
3 changed files with 6 additions and 6 deletions

View File

@ -32,11 +32,11 @@ namespace gtsam {
// A small helper class to replace Boost's `list_of` function.
template <typename T>
class ListOf {
class ChainedVector {
public:
ListOf(const T& c) { result.push_back(c); }
ChainedVector(const T& c) { result.push_back(c); }
ListOf& operator()(const T& c) {
ChainedVector& operator()(const T& c) {
result.push_back(c);
return *this;
}
@ -118,7 +118,7 @@ namespace gtsam {
boost::make_shared<SymbolicConditional>(_B_)};
using sharedClique = SymbolicBayesTreeClique::shared_ptr;
using Children = ListOf<sharedClique>;
using Children = ChainedVector<sharedClique>;
inline sharedClique LeafClique(const std::vector<Key>& keys,
DenseIndex nrFrontals) {

View File

@ -34,7 +34,7 @@ using namespace gtsam::symbol_shorthand;
static bool debug = false;
using Keys = ListOf<Key>; // Create Keys a la list_of
using Keys = ChainedVector<Key>; // Create Keys a la list_of
/* ************************************************************************* */
TEST(SymbolicBayesTree, clear) {

View File

@ -88,7 +88,7 @@ static sharedNode Node(Key key, const SymbolicFactorGraph& factors,
}
// Use list_of replacement defined in symbolicExampleGraphs.h
using ChildNodes = ListOf<sharedNode>;
using ChildNodes = ChainedVector<sharedNode>;
/* ************************************************************************* */
TEST(EliminationTree, Create) {