gtsam 4.2.0
gtsam
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
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:
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>
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
Hybrid Factor Graph Factor graph with utilities for hybrid factors.
Definition: HybridFactorGraph.h:39
HybridFactorGraph(const FactorGraph< DERIVEDFACTOR > &graph)
Implicit copy/downcast constructor to override explicit template container constructor.
Definition: HybridFactorGraph.h:61
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
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
A factor graph is a bipartite graph with factor nodes connected to variable nodes.
Definition: FactorGraph.h:97
A non-templated config holding any types of Manifold-group elements.
Definition: Values.h:65