35 using namespace gtsam;
57 std::cout << indent <<
"P( ";
58 for(
Key key: clique->conditional()->frontals()) {
61 if (clique->conditional()->nrParents() > 0)
63 for(
Key key: clique->conditional()->parents()) {
66 std::cout <<
")" << std::endl;
76 const std::string& label) {
77 std::cout << label << std::endl;
78 if (!
isam.roots().empty()) {
83 std::cout <<
"{Empty Tree}" << std::endl;
94 SETDEBUG(
"IncrementalFixedLagSmoother update",
true);
101 typedef IncrementalFixedLagSmoother::KeyTimestampMap Timestamps;
117 Timestamps newTimestamps;
121 newTimestamps[key0] = 0.0;
124 fullinit.
insert(newValues);
127 smoother.
update(newFactors, newValues, newTimestamps);
142 Timestamps newTimestamps;
146 newTimestamps[
key2] = double(
i);
149 fullinit.
insert(newValues);
152 smoother.
update(newFactors, newValues, newTimestamps);
168 Timestamps newTimestamps;
173 newTimestamps[
key2] = double(
i);
176 fullinit.
insert(newValues);
179 smoother.
update(newFactors, newValues, newTimestamps);
194 Timestamps newTimestamps;
201 newTimestamps[
key2] = double(
i);
204 fullinit.
insert(newValues);
207 smoother.
update(newFactors, newValues, newTimestamps);
222 Timestamps newTimestamps;
228 newTimestamps[
key2] = double(
i);
232 fullinit.
insert(newValues);
235 smoother.
update(newFactors, newValues, newTimestamps);
244 Timestamps emptyNewTimestamps;
246 size_t factorIndex = 25;
248 factorToRemove.push_back(factorIndex);
252 std::cout <<
"fullgraph.size() = " << fullgraph.
size() << std::endl;
253 std::cout <<
"smootherFactorsBeforeRemove.size() = "
254 << smootherFactorsBeforeRemove.
size() << std::endl;
257 smoother.
update(emptyNewFactors, emptyNewValues, emptyNewTimestamps,factorToRemove);
267 for(
size_t i=0;
i< smootherFactorsBeforeRemove.
size();
i++){
269 if(smootherFactorsBeforeRemove[
i] &&
i != factorIndex){
279 SETDEBUG(
"BayesTreeMarginalizationHelper",
true);
283 const int max_i = 500;
299 Timestamps newTimestamps;
323 newTimestamps[key_0] = double(
i);
326 fullinit.
insert(newValues);
329 smoother.
update(newFactors, newValues, newTimestamps);