From 1e99f68f7051154cfd49db739cf7bbeb42cbbfe4 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Sun, 8 Jan 2023 21:22:25 -0800 Subject: [PATCH] Renamed ListOf to something more descriptive --- gtsam/symbolic/tests/symbolicExampleGraphs.h | 8 ++++---- gtsam/symbolic/tests/testSymbolicBayesTree.cpp | 2 +- gtsam/symbolic/tests/testSymbolicEliminationTree.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gtsam/symbolic/tests/symbolicExampleGraphs.h b/gtsam/symbolic/tests/symbolicExampleGraphs.h index e3350dc5a..e0cf36339 100644 --- a/gtsam/symbolic/tests/symbolicExampleGraphs.h +++ b/gtsam/symbolic/tests/symbolicExampleGraphs.h @@ -32,11 +32,11 @@ namespace gtsam { // A small helper class to replace Boost's `list_of` function. template - 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(_B_)}; using sharedClique = SymbolicBayesTreeClique::shared_ptr; - using Children = ListOf; + using Children = ChainedVector; inline sharedClique LeafClique(const std::vector& keys, DenseIndex nrFrontals) { diff --git a/gtsam/symbolic/tests/testSymbolicBayesTree.cpp b/gtsam/symbolic/tests/testSymbolicBayesTree.cpp index c6daada1b..458579c60 100644 --- a/gtsam/symbolic/tests/testSymbolicBayesTree.cpp +++ b/gtsam/symbolic/tests/testSymbolicBayesTree.cpp @@ -34,7 +34,7 @@ using namespace gtsam::symbol_shorthand; static bool debug = false; -using Keys = ListOf; // Create Keys a la list_of +using Keys = ChainedVector; // Create Keys a la list_of /* ************************************************************************* */ TEST(SymbolicBayesTree, clear) { diff --git a/gtsam/symbolic/tests/testSymbolicEliminationTree.cpp b/gtsam/symbolic/tests/testSymbolicEliminationTree.cpp index ce5279d7b..9b750cfca 100644 --- a/gtsam/symbolic/tests/testSymbolicEliminationTree.cpp +++ b/gtsam/symbolic/tests/testSymbolicEliminationTree.cpp @@ -88,7 +88,7 @@ static sharedNode Node(Key key, const SymbolicFactorGraph& factors, } // Use list_of replacement defined in symbolicExampleGraphs.h -using ChildNodes = ListOf; +using ChildNodes = ChainedVector; /* ************************************************************************* */ TEST(EliminationTree, Create) {