gtsam 4.2
gtsam
Loading...
Searching...
No Matches
HybridFactorGraph.h
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4 * Atlanta, Georgia 30332-0415
5 * All Rights Reserved
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7
8 * See LICENSE for the license information
9
10 * -------------------------------------------------------------------------- */
11
19
20#pragma once
21
24
25#include <boost/format.hpp>
26#include <unordered_map>
27
28namespace gtsam {
29
30class DiscreteFactor;
31class Ordering;
32
33using SharedFactor = boost::shared_ptr<Factor>;
34
39class HybridFactorGraph : public FactorGraph<Factor> {
40 public:
41 using Base = FactorGraph<Factor>;
43 using shared_ptr = boost::shared_ptr<This>;
44
46 using Indices = KeyVector;
47
48 public:
51
53 HybridFactorGraph() = default;
54
60 template <class DERIVEDFACTOR>
61 HybridFactorGraph(const FactorGraph<DERIVEDFACTOR>& graph) : Base(graph) {}
62
66
68 std::set<DiscreteKey> discreteKeys() const;
69
71 KeySet discreteKeySet() const;
72
74 std::unordered_map<Key, DiscreteKey> discreteKeyMap() const;
75
77 const KeySet continuousKeySet() const;
78
80};
81
82} // namespace gtsam
Factor Graph Base Class.
Global functions in a separate testing namespace.
Definition chartTesting.h:28
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition Key.h:86
Base class for discrete probabilistic factors The most general one is the derived DecisionTreeFactor.
Definition DiscreteFactor.h:38
HybridFactorGraph(const FactorGraph< DERIVEDFACTOR > &graph)
Implicit copy/downcast constructor to override explicit template container constructor.
Definition HybridFactorGraph.h:61
HybridFactorGraph This
this class
Definition HybridFactorGraph.h:42
KeySet discreteKeySet() const
Get all the discrete keys in the factor graph, as a set.
Definition HybridFactorGraph.cpp:46
boost::shared_ptr< This > shared_ptr
shared_ptr to This
Definition HybridFactorGraph.h:43
gtsam::Values Values
backwards compatibility
Definition HybridFactorGraph.h:45
std::unordered_map< Key, DiscreteKey > discreteKeyMap() const
Get a map from Key to corresponding DiscreteKey.
Definition HybridFactorGraph.cpp:56
const KeySet continuousKeySet() const
Get all the continuous keys in the factor graph.
Definition HybridFactorGraph.cpp:65
HybridFactorGraph()=default
Default constructor.
std::set< DiscreteKey > discreteKeys() const
Get all the discrete keys in the factor graph.
Definition HybridFactorGraph.cpp:28
FactorGraph()
Definition FactorGraph.h:142
Definition Ordering.h:34
A non-templated config holding any types of Manifold-group elements.
Definition Values.h:65