Public Types | Public Member Functions | Private Types | Private Member Functions | List of all members
gtsam::EliminateableFactorGraph< FACTOR_GRAPH > Class Template Reference

#include <EliminateableFactorGraph.h>

Public Types

typedef EliminationTraitsType::BayesNetType BayesNetType
 Bayes net type produced by sequential elimination. More...
 
typedef EliminationTraitsType::BayesTreeType BayesTreeType
 Bayes tree type produced by multifrontal elimination. More...
 
typedef EliminationTraitsType::ConditionalType ConditionalType
 Conditional type stored in the Bayes net produced by elimination. More...
 
typedef std::function< EliminationResult(const FactorGraphType &, const Ordering &)> Eliminate
 The function type that does a single dense elimination step on a subgraph. More...
 
typedef std::pair< std::shared_ptr< ConditionalType >, std::shared_ptr< _FactorType > > EliminationResult
 
typedef EliminationTraits< FactorGraphTypeEliminationTraitsType
 Typedef to the specific EliminationTraits for this graph. More...
 
typedef EliminationTraitsType::EliminationTreeType EliminationTreeType
 Elimination tree type that can do sequential elimination of this graph. More...
 
typedef EliminationTraitsType::JunctionTreeType JunctionTreeType
 Junction tree type that can do multifrontal elimination of this graph. More...
 
typedef std::optional< Ordering::OrderingTypeOptionalOrderingType
 Typedef for an optional ordering type. More...
 
typedef std::optional< std::reference_wrapper< const VariableIndex > > OptionalVariableIndex
 

Public Member Functions

std::shared_ptr< BayesTreeTypeeliminateMultifrontal (const Ordering &ordering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::shared_ptr< BayesTreeTypeeliminateMultifrontal (OptionalOrderingType orderingType={}, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::pair< std::shared_ptr< BayesTreeType >, std::shared_ptr< FactorGraphType > > eliminatePartialMultifrontal (const KeyVector &variables, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::pair< std::shared_ptr< BayesTreeType >, std::shared_ptr< FactorGraphType > > eliminatePartialMultifrontal (const Ordering &ordering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::pair< std::shared_ptr< BayesNetType >, std::shared_ptr< FactorGraphType > > eliminatePartialSequential (const KeyVector &variables, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::pair< std::shared_ptr< BayesNetType >, std::shared_ptr< FactorGraphType > > eliminatePartialSequential (const Ordering &ordering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::shared_ptr< BayesNetTypeeliminateSequential (const Ordering &ordering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::shared_ptr< BayesNetTypeeliminateSequential (OptionalOrderingType orderingType={}, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::shared_ptr< FactorGraphTypemarginal (const KeyVector &variables, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::shared_ptr< BayesNetTypemarginalMultifrontalBayesNet (const KeyVector &variables, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::shared_ptr< BayesNetTypemarginalMultifrontalBayesNet (const KeyVector &variables, const Ordering &marginalizedVariableOrdering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::shared_ptr< BayesNetTypemarginalMultifrontalBayesNet (const Ordering &variables, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::shared_ptr< BayesNetTypemarginalMultifrontalBayesNet (const Ordering &variables, const Ordering &marginalizedVariableOrdering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::shared_ptr< BayesTreeTypemarginalMultifrontalBayesTree (const KeyVector &variables, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::shared_ptr< BayesTreeTypemarginalMultifrontalBayesTree (const KeyVector &variables, const Ordering &marginalizedVariableOrdering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::shared_ptr< BayesTreeTypemarginalMultifrontalBayesTree (const Ordering &variables, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 
std::shared_ptr< BayesTreeTypemarginalMultifrontalBayesTree (const Ordering &variables, const Ordering &marginalizedVariableOrdering, const Eliminate &function=EliminationTraitsType::DefaultEliminate, OptionalVariableIndex variableIndex={}) const
 

Private Types

typedef EliminationTraits< FactorGraphType >::FactorType _FactorType
 
typedef FACTOR_GRAPH FactorGraphType
 Typedef to factor graph type. More...
 
typedef EliminateableFactorGraph< FACTOR_GRAPH > This
 Typedef to this class. More...
 

Private Member Functions

FactorGraphTypeasDerived ()
 
const FactorGraphTypeasDerived () const
 

Detailed Description

template<class FACTOR_GRAPH>
class gtsam::EliminateableFactorGraph< FACTOR_GRAPH >

EliminateableFactorGraph is a base class for factor graphs that contains elimination algorithms. Any factor graph holding eliminateable factors can derive from this class to expose functions for computing marginals, conditional marginals, doing multifrontal and sequential elimination, etc.

Definition at line 55 of file EliminateableFactorGraph.h.

Member Typedef Documentation

◆ _FactorType

template<class FACTOR_GRAPH >
typedef EliminationTraits<FactorGraphType>::FactorType gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::_FactorType
private

Definition at line 62 of file EliminateableFactorGraph.h.

◆ BayesNetType

template<class FACTOR_GRAPH >
typedef EliminationTraitsType::BayesNetType gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::BayesNetType

Bayes net type produced by sequential elimination.

Definition at line 72 of file EliminateableFactorGraph.h.

◆ BayesTreeType

template<class FACTOR_GRAPH >
typedef EliminationTraitsType::BayesTreeType gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::BayesTreeType

Bayes tree type produced by multifrontal elimination.

Definition at line 78 of file EliminateableFactorGraph.h.

◆ ConditionalType

template<class FACTOR_GRAPH >
typedef EliminationTraitsType::ConditionalType gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::ConditionalType

Conditional type stored in the Bayes net produced by elimination.

Definition at line 69 of file EliminateableFactorGraph.h.

◆ Eliminate

template<class FACTOR_GRAPH >
typedef std::function<EliminationResult(const FactorGraphType&, const Ordering&)> gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::Eliminate

The function type that does a single dense elimination step on a subgraph.

Definition at line 88 of file EliminateableFactorGraph.h.

◆ EliminationResult

template<class FACTOR_GRAPH >
typedef std::pair<std::shared_ptr<ConditionalType>, std::shared_ptr<_FactorType> > gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::EliminationResult

The pair of conditional and remaining factor produced by a single dense elimination step on a subgraph.

Definition at line 85 of file EliminateableFactorGraph.h.

◆ EliminationTraitsType

template<class FACTOR_GRAPH >
typedef EliminationTraits<FactorGraphType> gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::EliminationTraitsType

Typedef to the specific EliminationTraits for this graph.

Definition at line 66 of file EliminateableFactorGraph.h.

◆ EliminationTreeType

template<class FACTOR_GRAPH >
typedef EliminationTraitsType::EliminationTreeType gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::EliminationTreeType

Elimination tree type that can do sequential elimination of this graph.

Definition at line 75 of file EliminateableFactorGraph.h.

◆ FactorGraphType

template<class FACTOR_GRAPH >
typedef FACTOR_GRAPH gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::FactorGraphType
private

Typedef to factor graph type.

Definition at line 59 of file EliminateableFactorGraph.h.

◆ JunctionTreeType

template<class FACTOR_GRAPH >
typedef EliminationTraitsType::JunctionTreeType gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::JunctionTreeType

Junction tree type that can do multifrontal elimination of this graph.

Definition at line 81 of file EliminateableFactorGraph.h.

◆ OptionalOrderingType

template<class FACTOR_GRAPH >
typedef std::optional<Ordering::OrderingType> gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::OptionalOrderingType

Typedef for an optional ordering type.

Definition at line 95 of file EliminateableFactorGraph.h.

◆ OptionalVariableIndex

template<class FACTOR_GRAPH >
typedef std::optional<std::reference_wrapper<const VariableIndex> > gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::OptionalVariableIndex

Typedef for an optional variable index as an argument to elimination functions It is an optional to a constant reference

Definition at line 92 of file EliminateableFactorGraph.h.

◆ This

template<class FACTOR_GRAPH >
typedef EliminateableFactorGraph<FACTOR_GRAPH> gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::This
private

Typedef to this class.

Definition at line 58 of file EliminateableFactorGraph.h.

Member Function Documentation

◆ asDerived() [1/2]

template<class FACTOR_GRAPH >
FactorGraphType& gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::asDerived ( )
inlineprivate

Definition at line 336 of file EliminateableFactorGraph.h.

◆ asDerived() [2/2]

template<class FACTOR_GRAPH >
const FactorGraphType& gtsam::EliminateableFactorGraph< FACTOR_GRAPH >::asDerived ( ) const
inlineprivate

Definition at line 333 of file EliminateableFactorGraph.h.

◆ eliminateMultifrontal() [1/2]

template<class FACTORGRAPH >
std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesTreeType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminateMultifrontal ( const Ordering ordering,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Do multifrontal elimination of all variables to produce a Bayes tree. If an ordering is not provided, the ordering will be computed using either COLAMD or METIS, depending on the parameter orderingType (Ordering::COLAMD or Ordering::METIS)

Example - Full QR elimination in specified order:

std::shared_ptr<GaussianBayesTree> result = graph.eliminateMultifrontal(EliminateQR, myOrdering);

Definition at line 125 of file EliminateableFactorGraph-inst.h.

◆ eliminateMultifrontal() [2/2]

template<class FACTORGRAPH >
std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesTreeType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminateMultifrontal ( OptionalOrderingType  orderingType = {},
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Do multifrontal elimination of all variables to produce a Bayes tree. If an ordering is not provided, the ordering will be computed using either COLAMD or METIS, depending on the parameter orderingType (Ordering::COLAMD or Ordering::METIS)

Example - Full Cholesky elimination in COLAMD order:

std::shared_ptr<GaussianBayesTree> result = graph.eliminateMultifrontal(EliminateCholesky);

Example - Reusing an existing VariableIndex to improve performance, and using COLAMD ordering:

VariableIndex varIndex(graph); // Build variable index
Data data = otherFunctionUsingVariableIndex(graph, varIndex); // Other code that uses variable index
std::shared_ptr<GaussianBayesTree> result = graph.eliminateMultifrontal(EliminateQR, {}, varIndex);

Definition at line 89 of file EliminateableFactorGraph-inst.h.

◆ eliminatePartialMultifrontal() [1/2]

template<class FACTORGRAPH >
std::pair< std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesTreeType >, std::shared_ptr< FACTORGRAPH > > gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminatePartialMultifrontal ( const KeyVector variables,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Do multifrontal elimination of the given variables in an ordering computed by COLAMD to produce a Bayes tree and a remaining factor graph. This computes the factorization $ p(X) = p(A|B) p(B) $, where $ A = $ variables, $ X $ is all the variables in the factor graph, and $ B = X\backslash A $.

Definition at line 209 of file EliminateableFactorGraph-inst.h.

◆ eliminatePartialMultifrontal() [2/2]

template<class FACTORGRAPH >
std::pair< std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesTreeType >, std::shared_ptr< FACTORGRAPH > > gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminatePartialMultifrontal ( const Ordering ordering,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Do multifrontal elimination of some variables, in ordering provided, to produce a Bayes tree and a remaining factor graph. This computes the factorization $ p(X) = p(A|B) p(B) $, where $ A = $ variables, $ X $ is all the variables in the factor graph, and $ B = X\backslash A $.

Definition at line 190 of file EliminateableFactorGraph-inst.h.

◆ eliminatePartialSequential() [1/2]

template<class FACTORGRAPH >
std::pair< std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesNetType >, std::shared_ptr< FACTORGRAPH > > gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminatePartialSequential ( const KeyVector variables,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Do sequential elimination of the given variables in an ordering computed by COLAMD to produce a Bayes net and a remaining factor graph. This computes the factorization $ p(X) = p(A|B) p(B) $, where $ A = $ variables, $ X $ is all the variables in the factor graph, and $ B = X\backslash A $.

Definition at line 169 of file EliminateableFactorGraph-inst.h.

◆ eliminatePartialSequential() [2/2]

template<class FACTORGRAPH >
std::pair< std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesNetType >, std::shared_ptr< FACTORGRAPH > > gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminatePartialSequential ( const Ordering ordering,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Do sequential elimination of some variables, in ordering provided, to produce a Bayes net and a remaining factor graph. This computes the factorization $ p(X) = p(A|B) p(B) $, where $ A = $ variables, $ X $ is all the variables in the factor graph, and $ B = X\backslash A $.

Definition at line 151 of file EliminateableFactorGraph-inst.h.

◆ eliminateSequential() [1/2]

template<class FACTORGRAPH >
std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesNetType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminateSequential ( const Ordering ordering,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Do sequential elimination of all variables to produce a Bayes net.

Example - Full QR elimination in specified order:

std::shared_ptr<GaussianBayesNet> result = graph.eliminateSequential(myOrdering, EliminateQR);

Example - Reusing an existing VariableIndex to improve performance:

VariableIndex varIndex(graph); // Build variable index
Data data = otherFunctionUsingVariableIndex(graph, varIndex); // Other code that uses variable index
std::shared_ptr<GaussianBayesNet> result = graph.eliminateSequential(myOrdering, EliminateQR, varIndex, std::nullopt);

Definition at line 63 of file EliminateableFactorGraph-inst.h.

◆ eliminateSequential() [2/2]

template<class FACTORGRAPH >
std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesNetType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminateSequential ( OptionalOrderingType  orderingType = {},
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Do sequential elimination of all variables to produce a Bayes net. If an ordering is not provided, the ordering provided by COLAMD will be used.

Example - Full Cholesky elimination in COLAMD order:

std::shared_ptr<GaussianBayesNet> result = graph.eliminateSequential(EliminateCholesky);

Example - METIS ordering for elimination

std::shared_ptr<GaussianBayesNet> result = graph.eliminateSequential(OrderingType::METIS);

Example - Reusing an existing VariableIndex to improve performance, and using COLAMD ordering:

VariableIndex varIndex(graph); // Build variable index
Data data = otherFunctionUsingVariableIndex(graph, varIndex); // Other code that uses variable index
std::shared_ptr<GaussianBayesNet> result = graph.eliminateSequential(EliminateQR, varIndex, std::nullopt);

Definition at line 29 of file EliminateableFactorGraph-inst.h.

◆ marginal()

template<class FACTORGRAPH >
std::shared_ptr< FACTORGRAPH > gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginal ( const KeyVector variables,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Compute the marginal factor graph of the requested variables.

Definition at line 440 of file EliminateableFactorGraph-inst.h.

◆ marginalMultifrontalBayesNet() [1/4]

template<class FACTORGRAPH >
std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesNetType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginalMultifrontalBayesNet ( const KeyVector variables,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Compute the marginal of the requested variables and return the result as a Bayes net. Uses COLAMD marginalization ordering by default

Parameters
variablesDetermines the variables whose marginal to compute, will be ordered using COLAMD; use Ordering(variables) to specify the variable ordering.
functionOptional dense elimination function.
variableIndexOptional pre-computed VariableIndex for the factor graph, if not provided one will be computed.

Definition at line 258 of file EliminateableFactorGraph-inst.h.

◆ marginalMultifrontalBayesNet() [2/4]

template<class FACTORGRAPH >
std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesNetType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginalMultifrontalBayesNet ( const KeyVector variables,
const Ordering marginalizedVariableOrdering,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Compute the marginal of the requested variables and return the result as a Bayes net.

Parameters
variablesDetermines the variables whose marginal to compute, will be ordered using COLAMD; use Ordering(variables) to specify the variable ordering.
marginalizedVariableOrderingOrdering for the variables being marginalized out, i.e. all variables not in variables.
functionOptional dense elimination function.
variableIndexOptional pre-computed VariableIndex for the factor graph, if not provided one will be computed.

Definition at line 311 of file EliminateableFactorGraph-inst.h.

◆ marginalMultifrontalBayesNet() [3/4]

template<class FACTORGRAPH >
std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesNetType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginalMultifrontalBayesNet ( const Ordering variables,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Compute the marginal of the requested variables and return the result as a Bayes net. Uses COLAMD marginalization ordering by default

Parameters
variablesDetermines the ordered variables whose marginal to compute, will be ordered in the returned BayesNet as specified.
functionOptional dense elimination function.
variableIndexOptional pre-computed VariableIndex for the factor graph, if not provided one will be computed.

Definition at line 230 of file EliminateableFactorGraph-inst.h.

◆ marginalMultifrontalBayesNet() [4/4]

template<class FACTORGRAPH >
std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesNetType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginalMultifrontalBayesNet ( const Ordering variables,
const Ordering marginalizedVariableOrdering,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Compute the marginal of the requested variables and return the result as a Bayes net.

Parameters
variablesDetermines the ordered variables whose marginal to compute, will be ordered in the returned BayesNet as specified.
marginalizedVariableOrderingOrdering for the variables being marginalized out, i.e. all variables not in variables.
functionOptional dense elimination function.
variableIndexOptional pre-computed VariableIndex for the factor graph, if not provided one will be computed.

Definition at line 286 of file EliminateableFactorGraph-inst.h.

◆ marginalMultifrontalBayesTree() [1/4]

template<class FACTORGRAPH >
std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesTreeType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginalMultifrontalBayesTree ( const KeyVector variables,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Compute the marginal of the requested variables and return the result as a Bayes tree. Uses COLAMD marginalization order by default

Parameters
variablesDetermines the variables whose marginal to compute, will be ordered using COLAMD; use Ordering(variables) to specify the variable ordering.
functionOptional dense elimination function..
variableIndexOptional pre-computed VariableIndex for the factor graph, if not provided one will be computed.

Definition at line 363 of file EliminateableFactorGraph-inst.h.

◆ marginalMultifrontalBayesTree() [2/4]

template<class FACTORGRAPH >
std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesTreeType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginalMultifrontalBayesTree ( const KeyVector variables,
const Ordering marginalizedVariableOrdering,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Compute the marginal of the requested variables and return the result as a Bayes tree.

Parameters
variablesDetermines the variables whose marginal to compute, will be ordered using COLAMD; use Ordering(variables) to specify the variable ordering.
marginalizedVariableOrderingOrdering for the variables being marginalized out, i.e. all variables not in variables.
functionOptional dense elimination function..
variableIndexOptional pre-computed VariableIndex for the factor graph, if not provided one will be computed.

Definition at line 416 of file EliminateableFactorGraph-inst.h.

◆ marginalMultifrontalBayesTree() [3/4]

template<class FACTORGRAPH >
std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesTreeType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginalMultifrontalBayesTree ( const Ordering variables,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Compute the marginal of the requested variables and return the result as a Bayes tree. Uses COLAMD marginalization order by default

Parameters
variablesDetermines the ordered variables whose marginal to compute, will be ordered in the returned BayesNet as specified.
functionOptional dense elimination function..
variableIndexOptional pre-computed VariableIndex for the factor graph, if not provided one will be computed.

Definition at line 335 of file EliminateableFactorGraph-inst.h.

◆ marginalMultifrontalBayesTree() [4/4]

template<class FACTORGRAPH >
std::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesTreeType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginalMultifrontalBayesTree ( const Ordering variables,
const Ordering marginalizedVariableOrdering,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = {} 
) const

Compute the marginal of the requested variables and return the result as a Bayes tree.

Parameters
variablesDetermines the ordered variables whose marginal to compute, will be ordered in the returned BayesNet as specified.
marginalizedVariableOrderingOrdering for the variables being marginalized out, i.e. all variables not in variables.
functionOptional dense elimination function..
variableIndexOptional pre-computed VariableIndex for the factor graph, if not provided one will be computed.

Definition at line 391 of file EliminateableFactorGraph-inst.h.


The documentation for this class was generated from the following files:
result
Values result
Definition: OdometryOptimize.cpp:8
data
int data[]
Definition: Map_placement_new.cpp:1
gtsam::EliminateCholesky
std::pair< std::shared_ptr< GaussianConditional >, std::shared_ptr< HessianFactor > > EliminateCholesky(const GaussianFactorGraph &factors, const Ordering &keys)
Definition: HessianFactor.cpp:518
graph
NonlinearFactorGraph graph
Definition: doc/Code/OdometryExample.cpp:2
gtsam::EliminateQR
std::pair< GaussianConditional::shared_ptr, JacobianFactor::shared_ptr > EliminateQR(const GaussianFactorGraph &factors, const Ordering &keys)
Definition: JacobianFactor.cpp:779


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:23:43