34 typedef std::shared_ptr<ConcurrentBatchFilter>
shared_ptr;
53 Result() : iterations(0), lambdas(0), nonlinearVariables(0), linearVariables(0), error(0) {}
107 template<
class VALUE>
110 return theta_.at<
VALUE>(
key).retract(delta);
127 const std::optional<
FastList<Key> >& keysToMove = {},
const std::optional< std::vector<size_t> >& removeFactorIndices = {});
133 void presync()
override;
165 void postsync()
override;
200 void removeFactors(
const std::vector<size_t>& slots);
203 void reorder(
const std::optional<
FastList<Key> >& keysToMove = {});
238 template<
class Container>
244 template<
class Container>
246 std::cout << indent << title;
248 std::cout <<
" " << keyFormatter(
key);
250 std::cout << std::endl;
void print(const Matrix &A, const string &s, ostream &stream)
const gtsam::Symbol key('X', 0)
Values calculateEstimate() const
ConcurrentBatchFilter(const LevenbergMarquardtParams ¶meters=LevenbergMarquardtParams())
size_t getLinearVariables() const
const NonlinearFactorGraph & getFactors() const
NonlinearFactorGraph smootherSummarization_
The smoother summarization on the old separator sent by the smoother during the last synchronization...
ConcurrentFilter Base
typedef for base class
double error
The final factor graph error.
std::vector< size_t > newFactorsIndices
Values separatorValues_
The linearization points of the separator variables. These should not be updated during optimization...
const GaussianFactorGraph factors
std::queue< size_t > availableSlots_
The set of available factor graph slots caused by deleting factors.
const Values & getLinearizationPoint() const
size_t lambdas
The number of different L-M lambda factors that were tried during optimization.
static const KeyFormatter DefaultKeyFormatter
static enum @1107 ordering
Values retract(const VectorValues &delta) const
static void PrintKeys(const Container &keys, const std::string &indent, const std::string &title, const KeyFormatter &keyFormatter=DefaultKeyFormatter)
Implementation of PrintKeys.
size_t getNonlinearVariables() const
NonlinearFactorGraph smootherShortcut_
A set of conditional factors from the old separator to the current separator (recursively calculated ...
Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
size_t linearVariables
The number of variables that must keep a constant linearization point.
A nonlinear optimizer that uses the Levenberg-Marquardt trust-region scheme.
size_t nonlinearVariables
The number of variables that can be relinearized.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
const Ordering & getOrdering() const
LevenbergMarquardtParams parameters_
LM parameters.
Values theta_
Current linearization point of all variables in the filter.
size_t getIterations() const
Getter methods.
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
static ConjugateGradientParameters parameters
std::shared_ptr< This > shared_ptr
shared_ptr to this class
size_t iterations
The number of optimizer iterations performed.
size_t getLambdas() const
std::vector< float > Values
NonlinearFactorGraph smootherFactors_
A temporary holding place for the set of full nonlinear factors being sent to the smoother...
void synchronize(ConcurrentFilter &filter, ConcurrentSmoother &smoother)
VectorValues delta_
The current set of linear deltas from the linearization point.
const VectorValues & getDelta() const
std::shared_ptr< This > shared_ptr
Ordering ordering_
The current ordering used to calculate the linear deltas.
NonlinearFactorGraph factors_
The set of all factors currently in the filter.
std::shared_ptr< ConcurrentBatchFilter > shared_ptr
NonlinearFactorGraph filterSummarization_
A temporary holding place for calculated filter summarization factors to be sent to the smoother...
ConcurrentBatchFilter::Result ConcurrentBatchFilterResult
Typedef for Matlab wrapping.
std::vector< size_t > separatorSummarizationSlots_
The slots in factor graph that correspond to the current smoother summarization on the current separa...
Base classes for the 'filter' and 'smoother' portion of the Concurrent Filtering and Smoothing archit...
std::uint64_t Key
Integer nonlinear key type.
VALUE calculateEstimate(Key key) const
Values smootherValues_
A temporary holding place for the linearization points of all keys being sent to the smoother...