31 Values smootherValues, filterSeparatorValues, smootherSeparatorValues;
39 filter.
synchronize(smootherSummarization, smootherSeparatorValues);
44 smoother.
synchronize(smootherFactors, smootherValues, filterSumarization, filterSeparatorValues);
61 std::set_intersection(allKeys.begin(), allKeys.end(), remainingKeys.begin(), remainingKeys.end(), std::inserter(rootKeys, rootKeys.end()));
65 std::set_difference(allKeys.begin(), allKeys.end(), remainingKeys.begin(), remainingKeys.end(), std::inserter(marginalizeKeys, marginalizeKeys.end()));
67 if(marginalizeKeys.size() == 0) {
75 KeyVector(marginalizeKeys.begin(), marginalizeKeys.end()), eliminateFunction).second;
79 marginalFactors.
reserve(marginalLinearFactors.
size());
81 marginalFactors += boost::make_shared<LinearContainerFactor>(gaussianFactor,
theta);
84 return marginalFactors;
std::pair< boost::shared_ptr< BayesTreeType >, boost::shared_ptr< FactorGraphType > > eliminatePartialMultifrontal(const Ordering &ordering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex=boost::none) const
Wrap Jacobian and Hessian linear factors to allow simple injection into a nonlinear graph...
NonlinearFactorGraph graph
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
virtual void getSummarizedFactors(NonlinearFactorGraph &summarizedFactors, Values &separatorValues)=0
virtual void getSummarizedFactors(NonlinearFactorGraph &summarizedFactors, Values &separatorValues)=0
NonlinearFactorGraph calculateMarginalFactors(const NonlinearFactorGraph &graph, const Values &theta, const KeySet &remainingKeys, const GaussianFactorGraph::Eliminate &eliminateFunction)
virtual void synchronize(const NonlinearFactorGraph &summarizedFactors, const Values &separatorValues)=0
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
void synchronize(ConcurrentFilter &filter, ConcurrentSmoother &smoother)
virtual void synchronize(const NonlinearFactorGraph &smootherFactors, const Values &smootherValues, const NonlinearFactorGraph &summarizedFactors, const Values &rootValues)=0
boost::function< EliminationResult(const FactorGraphType &, const Ordering &)> Eliminate
The function type that does a single dense elimination step on a subgraph.
void reserve(size_t size)
Base classes for the 'filter' and 'smoother' portion of the Concurrent Filtering and Smoothing archit...
virtual void getSmootherFactors(NonlinearFactorGraph &smootherFactors, Values &smootherValues)=0
boost::shared_ptr< GaussianFactorGraph > linearize(const Values &linearizationPoint) const
Linearize a nonlinear factor graph.