GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
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 <unordered_map>
26 
27 namespace gtsam {
28 
29 class DiscreteFactor;
30 class Ordering;
31 
32 using SharedFactor = std::shared_ptr<Factor>;
33 
38 class HybridFactorGraph : public FactorGraph<Factor> {
39  public:
40  using Base = FactorGraph<Factor>;
42  using shared_ptr = std::shared_ptr<This>;
43 
45  using Indices = KeyVector;
46 
47  public:
50 
52  HybridFactorGraph() = default;
53 
59  template <class DERIVEDFACTOR>
61 
65 
67  std::set<DiscreteKey> discreteKeys() const;
68 
70  KeySet discreteKeySet() const;
71 
73  std::unordered_map<Key, DiscreteKey> discreteKeyMap() const;
74 
76  const KeySet continuousKeySet() const;
77 
79 };
80 
81 } // namespace gtsam
std::set< DiscreteKey > discreteKeys() const
Get all the discrete keys in the factor graph.
KeySet discreteKeySet() const
Get all the discrete keys in the factor graph, as a set.
Definition: BayesTree.h:34
HybridFactorGraph()=default
Default constructor.
std::unordered_map< Key, DiscreteKey > discreteKeyMap() const
Get a map from Key to corresponding DiscreteKey.
const KeySet continuousKeySet() const
Get all the continuous keys in the factor graph.
std::shared_ptr< This > shared_ptr
shared_ptr to This
Definition: HybridFactorGraph.h:42
Definition: Values.h:65
Definition: chartTesting.h:28
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition: Key.h:86
Definition: HybridFactorGraph.h:38
Factor Graph Base Class.
HybridFactorGraph(const FactorGraph< DERIVEDFACTOR > &graph)
Definition: HybridFactorGraph.h:60