gtsam
Loading...
Searching...
No Matches
HybridNonlinearFactorGraph.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
18
19#pragma once
20
23
24namespace gtsam {
25
27
34class GTSAM_EXPORT HybridNonlinearFactorGraph : public HybridFactorGraph {
35 protected:
36 public:
37 using Base = HybridFactorGraph;
38 using This = HybridNonlinearFactorGraph;
39 using shared_ptr = std::shared_ptr<This>;
40
42 using Indices = KeyVector;
43
46
47 HybridNonlinearFactorGraph() = default;
48
54 template <class DERIVEDFACTOR>
56 : Base(graph) {}
57
61
63 void print(
64 const std::string& s = "HybridNonlinearFactorGraph",
65 const KeyFormatter& keyFormatter = DefaultKeyFormatter) const override;
66
68 void printErrors(
69 const HybridValues& values,
70 const std::string& str = "HybridNonlinearFactorGraph: ",
71 const KeyFormatter& keyFormatter = DefaultKeyFormatter,
73 printCondition = FactorErrorPredicate{
74 [](const Factor*, double, size_t) { return true; }}) const;
75
79
87 std::shared_ptr<HybridGaussianFactorGraph> linearize(
88 const Values& continuousValues) const;
89
91 using Base::error;
92
104 AlgebraicDecisionTree<Key> errorTree(const Values& values) const;
105
116 AlgebraicDecisionTree<Key> discretePosterior(
117 const Values& continuousValues) const;
118
120 HybridNonlinearFactorGraph restrict(
121 const DiscreteValues& assignment) const;
122
124};
125
126template <>
128 : public Testable<HybridNonlinearFactorGraph> {};
129
130} // namespace gtsam
Factor graph with utilities for hybrid factors.
Predicate used to filter factor-graph error output.
Global functions in a separate testing namespace.
Definition chartTesting.h:28
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Definition Key.cpp:30
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition Key.h:91
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:143
std::function< bool(const Factor *, double, std::size_t)> FactorErrorPredicate
Predicate used to select factor errors for graph diagnostics.
Definition FactorErrorPredicate.h:27
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition Key.h:35
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition Group.h:37
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:152
HybridFactorGraph()=default
Default constructor.
Definition HybridGaussianFactorGraph.h:107
Definition HybridNonlinearFactorGraph.h:34
std::shared_ptr< This > shared_ptr
shared_ptr to This
Definition HybridNonlinearFactorGraph.h:39
gtsam::Values Values
backwards compatibility
Definition HybridNonlinearFactorGraph.h:41
HybridNonlinearFactorGraph(const FactorGraph< DERIVEDFACTOR > &graph)
Implicit copy/downcast constructor to override explicit template container constructor.
Definition HybridNonlinearFactorGraph.h:55
HybridNonlinearFactorGraph This
this class
Definition HybridNonlinearFactorGraph.h:38
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:37
A factor graph is a bipartite graph with factor nodes connected to variable nodes.
Definition FactorGraph.h:58
Definition Factor.h:71
A non-templated config holding any types of Manifold-group elements.
Definition Values.h:65