Loading...
Searching...
No Matches
HybridFactorGraph.h
Go to the documentation of this file.
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* -------------------------------------------------------------------------- */
#pragma once
#include <gtsam/hybrid/HybridFactor.h>
#include <gtsam/inference/FactorGraph.h>
#include <boost/format.hpp>
#include <unordered_map>
namespace gtsam {
class DiscreteFactor;
class Ordering;
using SharedFactor = boost::shared_ptr<Factor>;
class HybridFactorGraph : public FactorGraph<Factor> {
public:
using Base = FactorGraph<Factor>;
using This = HybridFactorGraph;
using shared_ptr = boost::shared_ptr<This>;
using Values = gtsam::Values;
using Indices = KeyVector;
public:
HybridFactorGraph() = default;
template <class DERIVEDFACTOR>
HybridFactorGraph(const FactorGraph<DERIVEDFACTOR>& graph) : Base(graph) {}
std::set<DiscreteKey> discreteKeys() const;
KeySet discreteKeySet() const;
std::unordered_map<Key, DiscreteKey> discreteKeyMap() const;
const KeySet continuousKeySet() const;
};
} // namespace gtsam
HybridFactor.h
FactorGraph.h
Factor Graph Base Class.
gtsam
Global functions in a separate testing namespace.
Definition chartTesting.h:28
gtsam::KeyVector
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition Key.h:86
gtsam::DiscreteFactor
Base class for discrete probabilistic factors The most general one is the derived DecisionTreeFactor.
Definition DiscreteFactor.h:38
gtsam::HybridFactorGraph::HybridFactorGraph
HybridFactorGraph(const FactorGraph< DERIVEDFACTOR > &graph)
Implicit copy/downcast constructor to override explicit template container constructor.
Definition HybridFactorGraph.h:61
gtsam::HybridFactorGraph::This
HybridFactorGraph This
this class
Definition HybridFactorGraph.h:42
gtsam::HybridFactorGraph::discreteKeySet
KeySet discreteKeySet() const
Get all the discrete keys in the factor graph, as a set.
Definition HybridFactorGraph.cpp:46
gtsam::HybridFactorGraph::shared_ptr
boost::shared_ptr< This > shared_ptr
shared_ptr to This
Definition HybridFactorGraph.h:43
gtsam::HybridFactorGraph::Values
gtsam::Values Values
backwards compatibility
Definition HybridFactorGraph.h:45
gtsam::HybridFactorGraph::discreteKeyMap
std::unordered_map< Key, DiscreteKey > discreteKeyMap() const
Get a map from Key to corresponding DiscreteKey.
Definition HybridFactorGraph.cpp:56
gtsam::HybridFactorGraph::continuousKeySet
const KeySet continuousKeySet() const
Get all the continuous keys in the factor graph.
Definition HybridFactorGraph.cpp:65
gtsam::HybridFactorGraph::HybridFactorGraph
HybridFactorGraph()=default
Default constructor.
gtsam::HybridFactorGraph::discreteKeys
std::set< DiscreteKey > discreteKeys() const
Get all the discrete keys in the factor graph.
Definition HybridFactorGraph.cpp:28
gtsam::FactorGraph< Factor >::FactorGraph
FactorGraph()
Definition FactorGraph.h:142
gtsam::Ordering
Definition Ordering.h:34
gtsam::Values
A non-templated config holding any types of Manifold-group elements.
Definition Values.h:65