Renamed all typedefs of specific EliminationTraits to EliminationTraitsType to avoid name problem on GCC
parent
0fb15c7ec6
commit
1424c01fa9
|
|
@ -63,7 +63,7 @@ namespace gtsam {
|
|||
typedef typename CLIQUE::FactorGraphType FactorGraphType;
|
||||
typedef boost::shared_ptr<FactorGraphType> sharedFactorGraph;
|
||||
typedef typename FactorGraphType::Eliminate Eliminate;
|
||||
typedef typename CLIQUE::EliminationTraits EliminationTraits;
|
||||
typedef typename CLIQUE::EliminationTraitsType EliminationTraitsType;
|
||||
|
||||
/** A convenience class for a list of shared cliques */
|
||||
typedef FastList<sharedClique> Cliques;
|
||||
|
|
@ -161,19 +161,19 @@ namespace gtsam {
|
|||
* Alternatively, it may be directly used as its factor base class. For example, for Gaussian
|
||||
* systems, this returns a GaussianConditional, which inherits from JacobianFactor and
|
||||
* GaussianFactor. */
|
||||
sharedConditional marginalFactor(Key j, const Eliminate& function = EliminationTraits::DefaultEliminate) const;
|
||||
sharedConditional marginalFactor(Key j, const Eliminate& function = EliminationTraitsType::DefaultEliminate) const;
|
||||
|
||||
/**
|
||||
* return joint on two variables
|
||||
* Limitation: can only calculate joint if cliques are disjoint or one of them is root
|
||||
*/
|
||||
sharedFactorGraph joint(Index j1, Index j2, const Eliminate& function = EliminationTraits::DefaultEliminate) const;
|
||||
sharedFactorGraph joint(Index j1, Index j2, const Eliminate& function = EliminationTraitsType::DefaultEliminate) const;
|
||||
|
||||
/**
|
||||
* return joint on two variables as a BayesNet
|
||||
* Limitation: can only calculate joint if cliques are disjoint or one of them is root
|
||||
*/
|
||||
sharedBayesNet jointBayesNet(Index j1, Index j2, const Eliminate& function = EliminationTraits::DefaultEliminate) const;
|
||||
sharedBayesNet jointBayesNet(Index j1, Index j2, const Eliminate& function = EliminationTraitsType::DefaultEliminate) const;
|
||||
|
||||
/**
|
||||
* Read only with side effects
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ namespace gtsam {
|
|||
private:
|
||||
typedef BayesTreeCliqueBase<DERIVED, FACTORGRAPH> This;
|
||||
typedef DERIVED DerivedType;
|
||||
typedef EliminationTraits<FACTORGRAPH> EliminationTraits;
|
||||
typedef EliminationTraits<FACTORGRAPH> EliminationTraitsType;
|
||||
typedef boost::shared_ptr<This> shared_ptr;
|
||||
typedef boost::weak_ptr<This> weak_ptr;
|
||||
typedef boost::shared_ptr<DerivedType> derived_ptr;
|
||||
|
|
@ -52,7 +52,7 @@ namespace gtsam {
|
|||
|
||||
public:
|
||||
typedef FACTORGRAPH FactorGraphType;
|
||||
typedef typename EliminationTraits::BayesNetType BayesNetType;
|
||||
typedef typename EliminationTraitsType::BayesNetType BayesNetType;
|
||||
typedef typename BayesNetType::ConditionalType ConditionalType;
|
||||
typedef boost::shared_ptr<ConditionalType> sharedConditional;
|
||||
typedef typename FactorGraphType::FactorType FactorType;
|
||||
|
|
@ -112,13 +112,13 @@ namespace gtsam {
|
|||
/// @{
|
||||
|
||||
/** return the conditional P(S|Root) on the separator given the root */
|
||||
BayesNetType shortcut(const derived_ptr& root, Eliminate function = EliminationTraits::DefaultEliminate) const;
|
||||
BayesNetType shortcut(const derived_ptr& root, Eliminate function = EliminationTraitsType::DefaultEliminate) const;
|
||||
|
||||
/** return the marginal P(S) on the separator */
|
||||
FactorGraphType separatorMarginal(Eliminate function = EliminationTraits::DefaultEliminate) const;
|
||||
FactorGraphType separatorMarginal(Eliminate function = EliminationTraitsType::DefaultEliminate) const;
|
||||
|
||||
/** return the marginal P(C) of the clique, using marginal caching */
|
||||
FactorGraphType marginal2(Eliminate function = EliminationTraits::DefaultEliminate) const;
|
||||
FactorGraphType marginal2(Eliminate function = EliminationTraitsType::DefaultEliminate) const;
|
||||
|
||||
/**
|
||||
* This deletes the cached shortcuts of all cliques (subtree) below this clique.
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ namespace gtsam {
|
|||
EliminateableFactorGraph<FACTORGRAPH>::marginalMultifrontalBayesNet(
|
||||
boost::variant<const Ordering&, const std::vector<Key>&> variables,
|
||||
OptionalOrdering marginalizedVariableOrdering,
|
||||
const Eliminate& function = EliminationTraits::DefaultEliminate,
|
||||
const Eliminate& function = EliminationTraitsType::DefaultEliminate,
|
||||
OptionalVariableIndex variableIndex = boost::none) const
|
||||
{
|
||||
if(variableIndex)
|
||||
|
|
@ -200,7 +200,7 @@ namespace gtsam {
|
|||
EliminateableFactorGraph<FACTORGRAPH>::marginalMultifrontalBayesTree(
|
||||
boost::variant<const Ordering&, const std::vector<Key>&> variables,
|
||||
OptionalOrdering marginalizedVariableOrdering,
|
||||
const Eliminate& function = EliminationTraits::DefaultEliminate,
|
||||
const Eliminate& function = EliminationTraitsType::DefaultEliminate,
|
||||
OptionalVariableIndex variableIndex = boost::none) const
|
||||
{
|
||||
if(variableIndex)
|
||||
|
|
@ -256,7 +256,7 @@ namespace gtsam {
|
|||
boost::shared_ptr<FACTORGRAPH>
|
||||
EliminateableFactorGraph<FACTORGRAPH>::marginal(
|
||||
const std::vector<Key>& variables,
|
||||
const Eliminate& function = EliminationTraits::DefaultEliminate,
|
||||
const Eliminate& function = EliminationTraitsType::DefaultEliminate,
|
||||
OptionalVariableIndex variableIndex = boost::none) const
|
||||
{
|
||||
if(variableIndex)
|
||||
|
|
|
|||
|
|
@ -63,22 +63,22 @@ namespace gtsam {
|
|||
|
||||
public:
|
||||
/// Typedef to the specific EliminationTraits for this graph
|
||||
typedef EliminationTraits<FactorGraphType> EliminationTraits;
|
||||
typedef EliminationTraits<FactorGraphType> EliminationTraitsType;
|
||||
|
||||
/// Conditional type stored in the Bayes net produced by elimination
|
||||
typedef typename EliminationTraits::ConditionalType ConditionalType;
|
||||
typedef typename EliminationTraitsType::ConditionalType ConditionalType;
|
||||
|
||||
/// Bayes net type produced by sequential elimination
|
||||
typedef typename EliminationTraits::BayesNetType BayesNetType;
|
||||
typedef typename EliminationTraitsType::BayesNetType BayesNetType;
|
||||
|
||||
/// Elimination tree type that can do sequential elimination of this graph
|
||||
typedef typename EliminationTraits::EliminationTreeType EliminationTreeType;
|
||||
typedef typename EliminationTraitsType::EliminationTreeType EliminationTreeType;
|
||||
|
||||
/// Bayes tree type produced by multifrontal elimination
|
||||
typedef typename EliminationTraits::BayesTreeType BayesTreeType;
|
||||
typedef typename EliminationTraitsType::BayesTreeType BayesTreeType;
|
||||
|
||||
/// Junction tree type that can do multifrontal elimination of this graph
|
||||
typedef typename EliminationTraits::JunctionTreeType JunctionTreeType;
|
||||
typedef typename EliminationTraitsType::JunctionTreeType JunctionTreeType;
|
||||
|
||||
/// The pair of conditional and remaining factor produced by a single dense elimination step on
|
||||
/// a subgraph.
|
||||
|
|
@ -115,7 +115,7 @@ namespace gtsam {
|
|||
* */
|
||||
boost::shared_ptr<BayesNetType> eliminateSequential(
|
||||
OptionalOrdering ordering = boost::none,
|
||||
const Eliminate& function = EliminationTraits::DefaultEliminate,
|
||||
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
|
||||
|
|
@ -140,7 +140,7 @@ namespace gtsam {
|
|||
* */
|
||||
boost::shared_ptr<BayesTreeType> eliminateMultifrontal(
|
||||
OptionalOrdering ordering = boost::none,
|
||||
const Eliminate& function = EliminationTraits::DefaultEliminate,
|
||||
const Eliminate& function = EliminationTraitsType::DefaultEliminate,
|
||||
OptionalVariableIndex variableIndex = boost::none) const;
|
||||
|
||||
/** Do sequential elimination of some variables in the given \c ordering to produce a Bayes net
|
||||
|
|
@ -150,7 +150,7 @@ namespace gtsam {
|
|||
std::pair<boost::shared_ptr<BayesNetType>, boost::shared_ptr<FactorGraphType> >
|
||||
eliminatePartialSequential(
|
||||
const Ordering& ordering,
|
||||
const Eliminate& function = EliminationTraits::DefaultEliminate,
|
||||
const Eliminate& function = EliminationTraitsType::DefaultEliminate,
|
||||
OptionalVariableIndex variableIndex = boost::none) const;
|
||||
|
||||
/** Do sequential elimination of the given \c variables in an ordering computed by COLAMD to
|
||||
|
|
@ -160,7 +160,7 @@ namespace gtsam {
|
|||
std::pair<boost::shared_ptr<BayesNetType>, boost::shared_ptr<FactorGraphType> >
|
||||
eliminatePartialSequential(
|
||||
const std::vector<Key>& variables,
|
||||
const Eliminate& function = EliminationTraits::DefaultEliminate,
|
||||
const Eliminate& function = EliminationTraitsType::DefaultEliminate,
|
||||
OptionalVariableIndex variableIndex = boost::none) const;
|
||||
|
||||
/** Do multifrontal elimination of the given \c variables in an ordering computed by COLAMD to
|
||||
|
|
@ -170,7 +170,7 @@ namespace gtsam {
|
|||
std::pair<boost::shared_ptr<BayesTreeType>, boost::shared_ptr<FactorGraphType> >
|
||||
eliminatePartialMultifrontal(
|
||||
const Ordering& ordering,
|
||||
const Eliminate& function = EliminationTraits::DefaultEliminate,
|
||||
const Eliminate& function = EliminationTraitsType::DefaultEliminate,
|
||||
OptionalVariableIndex variableIndex = boost::none) const;
|
||||
|
||||
/** Do multifrontal elimination of some variables in the given \c ordering to produce a Bayes
|
||||
|
|
@ -180,7 +180,7 @@ namespace gtsam {
|
|||
std::pair<boost::shared_ptr<BayesTreeType>, boost::shared_ptr<FactorGraphType> >
|
||||
eliminatePartialMultifrontal(
|
||||
const std::vector<Key>& variables,
|
||||
const Eliminate& function = EliminationTraits::DefaultEliminate,
|
||||
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.
|
||||
|
|
@ -197,7 +197,7 @@ namespace gtsam {
|
|||
boost::shared_ptr<BayesNetType> marginalMultifrontalBayesNet(
|
||||
boost::variant<const Ordering&, const std::vector<Key>&> variables,
|
||||
OptionalOrdering marginalizedVariableOrdering = boost::none,
|
||||
const Eliminate& function = EliminationTraits::DefaultEliminate,
|
||||
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.
|
||||
|
|
@ -214,13 +214,13 @@ namespace gtsam {
|
|||
boost::shared_ptr<BayesTreeType> marginalMultifrontalBayesTree(
|
||||
boost::variant<const Ordering&, const std::vector<Key>&> variables,
|
||||
OptionalOrdering marginalizedVariableOrdering = boost::none,
|
||||
const Eliminate& function = EliminationTraits::DefaultEliminate,
|
||||
const Eliminate& function = EliminationTraitsType::DefaultEliminate,
|
||||
OptionalVariableIndex variableIndex = boost::none) const;
|
||||
|
||||
/** Compute the marginal factor graph of the requested variables. */
|
||||
boost::shared_ptr<FactorGraphType> marginal(
|
||||
const std::vector<Key>& variables,
|
||||
const Eliminate& function = EliminationTraits::DefaultEliminate,
|
||||
const Eliminate& function = EliminationTraitsType::DefaultEliminate,
|
||||
OptionalVariableIndex variableIndex = boost::none) const;
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace gtsam {
|
|||
typedef typename Base::FactorGraphType FactorGraphType;
|
||||
typedef typename Base::Cliques Cliques;
|
||||
typedef typename Base::Eliminate Eliminate;
|
||||
typedef typename Base::EliminationTraits EliminationTraits;
|
||||
typedef typename Base::EliminationTraitsType EliminationTraitsType;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -56,11 +56,11 @@ namespace gtsam {
|
|||
* @param newFactors is a factor graph that contains the new factors
|
||||
* @param function an elimination routine
|
||||
*/
|
||||
void update(const FactorGraphType& newFactors, const Eliminate& function = EliminationTraits::DefaultEliminate);
|
||||
void update(const FactorGraphType& newFactors, const Eliminate& function = EliminationTraitsType::DefaultEliminate);
|
||||
|
||||
/** update_internal provides access to list of orphans for drawing purposes */
|
||||
void update_internal(const FactorGraphType& newFactors, Cliques& orphans,
|
||||
const Eliminate& function = EliminationTraits::DefaultEliminate);
|
||||
const Eliminate& function = EliminationTraitsType::DefaultEliminate);
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ namespace gtsam {
|
|||
* followed by back-substitution in the Bayes tree resulting from elimination. Is equivalent
|
||||
* to calling graph.eliminateMultifrontal()->optimize(). */
|
||||
VectorValues optimize(OptionalOrdering ordering = boost::none,
|
||||
const Eliminate& function = EliminationTraits::DefaultEliminate) const;
|
||||
const Eliminate& function = EliminationTraitsType::DefaultEliminate) const;
|
||||
|
||||
/**
|
||||
* Compute the gradient of the energy function,
|
||||
|
|
|
|||
Loading…
Reference in New Issue