34 typedef std::shared_ptr<ConcurrentBatchSmoother> shared_ptr;
46 Result() : iterations(0), lambdas(0), nonlinearVariables(0), linearVariables(0), error(0) {};
50 size_t getLambdas()
const {
return lambdas; }
51 size_t getNonlinearVariables()
const {
return nonlinearVariables; }
52 size_t getLinearVariables()
const {
return linearVariables; }
53 double getError()
const {
return error; }
63 void print(
const std::string& s =
"Concurrent Batch Smoother:\n",
const KeyFormatter& keyFormatter = DefaultKeyFormatter)
const override;
100 template<
class VALUE>
102 const Vector delta = delta_.at(key);
103 return theta_.at<VALUE>(key).retract(delta);
121 const std::optional< std::vector<size_t> >& removeFactorIndices = {});
127 void presync()
override;
153 void postsync()
override;
183 void removeFactors(
const std::vector<size_t>& slots);
192 void updateSmootherSummarization();
195 static void PrintNonlinearFactor(
const NonlinearFactor::shared_ptr& factor,
196 const std::string& indent =
"",
const KeyFormatter& keyFormatter = DefaultKeyFormatter);
200 const std::string& indent =
"",
const KeyFormatter& keyFormatter = DefaultKeyFormatter);
Definition: LevenbergMarquardtParams.h:35
NonlinearFactorGraph smootherSummarization_
A temporary holding place for calculated smoother summarization.
Definition: ConcurrentBatchSmoother.h:168
~ConcurrentBatchSmoother() override
Definition: ConcurrentBatchSmoother.h:60
size_t nonlinearVariables
The number of variables that can be relinearized.
Definition: ConcurrentBatchSmoother.h:41
size_t lambdas
The number of different L-M lambda factors that were tried during optimization.
Definition: ConcurrentBatchSmoother.h:40
Definition: ConcurrentBatchSmoother.h:31
Definition: Testable.h:152
Ordering ordering_
The current ordering used to calculate the linear deltas.
Definition: ConcurrentBatchSmoother.h:160
Values separatorValues_
The linearization points of the separator variables. These should not be updated during optimization...
Definition: ConcurrentBatchSmoother.h:164
Definition: Ordering.h:37
Values calculateEstimate() const
Definition: ConcurrentBatchSmoother.h:91
VectorValues delta_
The current set of linear deltas from the linearization point.
Definition: ConcurrentBatchSmoother.h:161
ConcurrentBatchSmoother(const LevenbergMarquardtParams ¶meters=LevenbergMarquardtParams())
Definition: ConcurrentBatchSmoother.h:57
Definition: ConcurrentFilteringAndSmoothing.h:101
Values retract(const VectorValues &delta) const
Definition: VectorValues.h:74
const Ordering & getOrdering() const
Definition: ConcurrentBatchSmoother.h:79
size_t getIterations() const
Getter methods.
Definition: ConcurrentBatchSmoother.h:49
ConcurrentBatchSmoother::Result ConcurrentBatchSmootherResult
Typedef for Matlab wrapping.
Definition: ConcurrentBatchSmoother.h:205
Definition: Testable.h:112
GTSAM_EXPORT Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
Result()
Constructor.
Definition: ConcurrentBatchSmoother.h:46
ConcurrentSmoother Base
typedef for base class
Definition: ConcurrentBatchSmoother.h:35
size_t iterations
The number of optimizer iterations performed.
Definition: ConcurrentBatchSmoother.h:39
double error
The final factor graph error.
Definition: ConcurrentBatchSmoother.h:43
GTSAM_EXPORT void print(const Matrix &A, const std::string &s, std::ostream &stream)
VariableIndex variableIndex_
The current variable index, which allows efficient factor lookup by variable.
Definition: ConcurrentBatchSmoother.h:162
A nonlinear optimizer that uses the Levenberg-Marquardt trust-region scheme.
LevenbergMarquardtParams parameters_
LM parameters.
Definition: ConcurrentBatchSmoother.h:157
Values theta_
Current linearization point of all variables in the smoother.
Definition: ConcurrentBatchSmoother.h:159
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:35
Definition: NonlinearFactorGraph.h:55
size_t linearVariables
The number of variables that must keep a constant linearization point.
Definition: ConcurrentBatchSmoother.h:42
std::shared_ptr< This > shared_ptr
shared_ptr to this class
Definition: GaussianFactor.h:42
Definition: chartTesting.h:28
std::vector< size_t > filterSummarizationSlots_
The slots in factor graph that correspond to the current filter summarization factors.
Definition: ConcurrentBatchSmoother.h:165
NonlinearFactorGraph factors_
The set of all factors currently in the smoother.
Definition: ConcurrentBatchSmoother.h:158
Definition: VariableIndex.h:41
const VectorValues & getDelta() const
Definition: ConcurrentBatchSmoother.h:84
const NonlinearFactorGraph & getFactors() const
Definition: ConcurrentBatchSmoother.h:69
VALUE calculateEstimate(Key key) const
Definition: ConcurrentBatchSmoother.h:101
Base classes for the 'filter' and 'smoother' portion of the Concurrent Filtering and Smoothing archit...
const Values & getLinearizationPoint() const
Definition: ConcurrentBatchSmoother.h:74
std::queue< size_t > availableSlots_
The set of available factor graph slots caused by deleting factors.
Definition: ConcurrentBatchSmoother.h:163
Definition: ConcurrentBatchSmoother.h:38
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:102