Public Types | Public Member Functions | Private Types | Private Member Functions | List of all members
gtsam::EliminateableFactorGraph< FACTORGRAPH > 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 boost::function< EliminationResult(const FactorGraphType &, const Ordering &)> Eliminate
 The function type that does a single dense elimination step on a subgraph. More...
 
typedef std::pair< boost::shared_ptr< ConditionalType >, boost::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 boost::optional< Ordering::OrderingTypeOptionalOrderingType
 Typedef for an optional ordering type. More...
 
typedef boost::optional< const VariableIndex & > OptionalVariableIndex
 Typedef for an optional variable index as an argument to elimination functions. More...
 

Public Member Functions

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

Private Types

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

Private Member Functions

const FactorGraphTypeasDerived () const
 
FactorGraphTypeasDerived ()
 

Detailed Description

template<class FACTORGRAPH>
class gtsam::EliminateableFactorGraph< FACTORGRAPH >

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 56 of file EliminateableFactorGraph.h.

Member Typedef Documentation

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

Definition at line 63 of file EliminateableFactorGraph.h.

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

Bayes net type produced by sequential elimination.

Definition at line 73 of file EliminateableFactorGraph.h.

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

Bayes tree type produced by multifrontal elimination.

Definition at line 79 of file EliminateableFactorGraph.h.

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

Conditional type stored in the Bayes net produced by elimination.

Definition at line 70 of file EliminateableFactorGraph.h.

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

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

Definition at line 89 of file EliminateableFactorGraph.h.

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

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

Definition at line 86 of file EliminateableFactorGraph.h.

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

Typedef to the specific EliminationTraits for this graph.

Definition at line 67 of file EliminateableFactorGraph.h.

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

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

Definition at line 76 of file EliminateableFactorGraph.h.

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

Typedef to factor graph type.

Definition at line 60 of file EliminateableFactorGraph.h.

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

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

Definition at line 82 of file EliminateableFactorGraph.h.

template<class FACTORGRAPH>
typedef boost::optional<Ordering::OrderingType> gtsam::EliminateableFactorGraph< FACTORGRAPH >::OptionalOrderingType

Typedef for an optional ordering type.

Definition at line 95 of file EliminateableFactorGraph.h.

template<class FACTORGRAPH>
typedef boost::optional<const VariableIndex&> gtsam::EliminateableFactorGraph< FACTORGRAPH >::OptionalVariableIndex

Typedef for an optional variable index as an argument to elimination functions.

Definition at line 92 of file EliminateableFactorGraph.h.

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

Typedef to this class.

Definition at line 59 of file EliminateableFactorGraph.h.

Member Function Documentation

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

Definition at line 285 of file EliminateableFactorGraph.h.

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

Definition at line 288 of file EliminateableFactorGraph.h.

template<class FACTORGRAPH >
boost::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesTreeType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminateMultifrontal ( OptionalOrderingType  orderingType = boost::none,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = boost::none 
) 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, dependeing on the parameter orderingType (Ordering::COLAMD or Ordering::METIS)

Example - Full Cholesky elimination in COLAMD order:

boost::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
boost::shared_ptr<GaussianBayesTree> result = graph.eliminateMultifrontal(EliminateQR, boost::none, varIndex);

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

template<class FACTORGRAPH >
boost::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesTreeType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminateMultifrontal ( const Ordering ordering,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = boost::none 
) 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, dependeing on the parameter orderingType (Ordering::COLAMD or Ordering::METIS)

Example - Full QR elimination in specified order:

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

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

template<class FACTORGRAPH>
boost::shared_ptr<BayesTreeType> gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminateMultifrontal ( const Ordering ordering,
const Eliminate function,
OptionalVariableIndex  variableIndex,
OptionalOrderingType  orderingType 
) const
inline
Deprecated:
ordering and orderingType shouldn't both be specified

Definition at line 309 of file EliminateableFactorGraph.h.

template<class FACTORGRAPH>
boost::shared_ptr<BayesTreeType> gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminateMultifrontal ( const Eliminate function,
OptionalVariableIndex  variableIndex = boost::none,
OptionalOrderingType  orderingType = boost::none 
) const
inline
Deprecated:
orderingType specified first for consistency

Definition at line 318 of file EliminateableFactorGraph.h.

template<class FACTORGRAPH >
std::pair< boost::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesTreeType >, boost::shared_ptr< FACTORGRAPH > > gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminatePartialMultifrontal ( const Ordering ordering,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = boost::none 
) 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 177 of file EliminateableFactorGraph-inst.h.

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

Do multifrontal 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 196 of file EliminateableFactorGraph-inst.h.

template<class FACTORGRAPH >
std::pair< boost::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesNetType >, boost::shared_ptr< FACTORGRAPH > > gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminatePartialSequential ( const Ordering ordering,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = boost::none 
) 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 138 of file EliminateableFactorGraph-inst.h.

template<class FACTORGRAPH >
std::pair< boost::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesNetType >, boost::shared_ptr< FACTORGRAPH > > gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminatePartialSequential ( const KeyVector variables,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = boost::none 
) 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 156 of file EliminateableFactorGraph-inst.h.

template<class FACTORGRAPH >
boost::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesNetType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminateSequential ( OptionalOrderingType  orderingType = boost::none,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = boost::none 
) 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:

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

Example - METIS ordering for elimination

boost::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
boost::shared_ptr<GaussianBayesNet> result = graph.eliminateSequential(EliminateQR, varIndex, boost::none);

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

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

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

Example - Full QR elimination in specified order:

boost::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
boost::shared_ptr<GaussianBayesNet> result = graph.eliminateSequential(myOrdering, EliminateQR, varIndex, boost::none);

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

template<class FACTORGRAPH>
boost::shared_ptr<BayesNetType> gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminateSequential ( const Ordering ordering,
const Eliminate function,
OptionalVariableIndex  variableIndex,
OptionalOrderingType  orderingType 
) const
inline
Deprecated:
ordering and orderingType shouldn't both be specified

Definition at line 292 of file EliminateableFactorGraph.h.

template<class FACTORGRAPH>
boost::shared_ptr<BayesNetType> gtsam::EliminateableFactorGraph< FACTORGRAPH >::eliminateSequential ( const Eliminate function,
OptionalVariableIndex  variableIndex = boost::none,
OptionalOrderingType  orderingType = boost::none 
) const
inline
Deprecated:
orderingType specified first for consistency

Definition at line 301 of file EliminateableFactorGraph.h.

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

Compute the marginal factor graph of the requested variables.

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

template<class FACTORGRAPH >
boost::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesNetType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginalMultifrontalBayesNet ( boost::variant< const Ordering &, const KeyVector & >  variables,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = boost::none 
) 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, if provided as an Ordering they will be ordered in the returned BayesNet as specified, and if provided as a KeyVector they will be ordered using constrained COLAMD.
functionOptional dense elimination function, if not provided the default will be used.
variableIndexOptional pre-computed VariableIndex for the factor graph, if not provided one will be computed.

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

template<class FACTORGRAPH >
boost::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesNetType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginalMultifrontalBayesNet ( boost::variant< const Ordering &, const KeyVector & >  variables,
const Ordering marginalizedVariableOrdering,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = boost::none 
) const

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

Parameters
variablesDetermines the variables whose marginal to compute, if provided as an Ordering they will be ordered in the returned BayesNet as specified, and if provided as a KeyVector they will be ordered using constrained COLAMD.
marginalizedVariableOrderingOrdering for the variables being marginalized out, i.e. all variables not in variables.
functionOptional dense elimination function, if not provided the default will be used.
variableIndexOptional pre-computed VariableIndex for the factor graph, if not provided one will be computed.

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

template<class FACTORGRAPH>
boost::shared_ptr<BayesNetType> gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginalMultifrontalBayesNet ( boost::variant< const Ordering &, const KeyVector & >  variables,
boost::none_t  ,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = boost::none 
) const
inline
Deprecated:

Definition at line 326 of file EliminateableFactorGraph.h.

template<class FACTORGRAPH >
boost::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesTreeType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginalMultifrontalBayesTree ( boost::variant< const Ordering &, const KeyVector & >  variables,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = boost::none 
) 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, if provided as an Ordering they will be ordered in the returned BayesNet as specified, and if provided as a KeyVector they will be ordered using constrained COLAMD.
functionOptional dense elimination function, if not provided the default will be used.
variableIndexOptional pre-computed VariableIndex for the factor graph, if not provided one will be computed.

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

template<class FACTORGRAPH >
boost::shared_ptr< typename EliminateableFactorGraph< FACTORGRAPH >::BayesTreeType > gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginalMultifrontalBayesTree ( boost::variant< const Ordering &, const KeyVector & >  variables,
const Ordering marginalizedVariableOrdering,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = boost::none 
) const

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

Parameters
variablesDetermines the variables whose marginal to compute, if provided as an Ordering they will be ordered in the returned BayesNet as specified, and if provided as a KeyVector they will be ordered using constrained COLAMD.
marginalizedVariableOrderingOrdering for the variables being marginalized out, i.e. all variables not in variables.
functionOptional dense elimination function, if not provided the default will be used.
variableIndexOptional pre-computed VariableIndex for the factor graph, if not provided one will be computed.

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

template<class FACTORGRAPH>
boost::shared_ptr<BayesTreeType> gtsam::EliminateableFactorGraph< FACTORGRAPH >::marginalMultifrontalBayesTree ( boost::variant< const Ordering &, const KeyVector & >  variables,
boost::none_t  ,
const Eliminate function = EliminationTraitsType::DefaultEliminate,
OptionalVariableIndex  variableIndex = boost::none 
) const
inline
Deprecated:

Definition at line 335 of file EliminateableFactorGraph.h.


The documentation for this class was generated from the following files:


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:58:08