33 class GaussianFactorGraph;
34 class SymbolicFactorGraph;
41 enum Axis { X, Y, Z, NEGX, NEGY, NEGZ };
54 paperHorizontalAxis(Y), paperVerticalAxis(X),
55 figureWidthInches(5), figureHeightInches(5), scale(1),
56 mergeSimilarFactors(false), plotFactorPoints(true),
57 connectKeysToFactor(true) {}
75 typedef boost::shared_ptr<This> shared_ptr;
81 template<
typename ITERATOR>
85 template<
class CONTAINER>
89 template<
class DERIVEDFACTOR>
93 void print(
const std::string& str =
"NonlinearFactorGraph: ",
const KeyFormatter& keyFormatter = DefaultKeyFormatter)
const;
99 void saveGraph(std::ostream& stm,
const Values& values =
Values(),
101 const KeyFormatter& keyFormatter = DefaultKeyFormatter)
const;
107 double error(
const Values& c)
const;
110 double probPrime(
const Values& c)
const;
115 boost::shared_ptr<SymbolicFactorGraph> symbolic()
const;
135 boost::shared_ptr<GaussianFactorGraph> linearize(
const Values& linearizationPoint)
const;
156 friend class boost::serialization::access;
157 template<
class ARCHIVE>
158 void serialize(ARCHIVE & ar,
const unsigned int version) {
159 ar & boost::serialization::make_nvp(
"NonlinearFactorGraph",
160 boost::serialization::base_object<Base>(*
this));
Non-linear factor base classes.
double figureWidthInches
The figure width on paper in inches.
Definition: NonlinearFactorGraph.h:44
Axis paperVerticalAxis
The world axis assigned to the vertical paper axis.
Definition: NonlinearFactorGraph.h:43
A factor graph is a bipartite graph with factor nodes connected to variable nodes.
Definition: BayesTree.h:32
bool mergeSimilarFactors
Merge multiple factors that have the same connectivity.
Definition: NonlinearFactorGraph.h:47
NonlinearFactorGraph(ITERATOR firstFactor, ITERATOR lastFactor)
Construct from iterator over factors.
Definition: NonlinearFactorGraph.h:82
NonlinearFactorGraph(const CONTAINER &factors)
Construct from container of factors (shared_ptr or plain objects)
Definition: NonlinearFactorGraph.h:86
double figureHeightInches
The figure height on paper in inches.
Definition: NonlinearFactorGraph.h:45
NonlinearFactorGraph()
Default constructor.
Definition: NonlinearFactorGraph.h:78
bool plotFactorPoints
Plots each factor as a dot between the variables.
Definition: NonlinearFactorGraph.h:48
double scale
Scale all positions to reduce / increase density.
Definition: NonlinearFactorGraph.h:46
A non-templated config holding any types of Manifold-group elements.
Definition: Values.h:75
void print(const Matrix &A, const string &s, ostream &stream)
print a matrix
Definition: Matrix.cpp:183
std::map< size_t, Point2 > factorPositions
(optional for each factor) Manually specify factor "dot" positions.
Definition: NonlinearFactorGraph.h:50
A non-linear factor graph is a graph of non-Gaussian, i.e.
Definition: NonlinearFactorGraph.h:69
Template to create a binary predicate.
Definition: Testable.h:102
bool connectKeysToFactor
Draw a line from each key within a factor to the dot of the factor.
Definition: NonlinearFactorGraph.h:49
NonlinearFactorGraph(const FactorGraph< DERIVEDFACTOR > &graph)
Implicit copy/downcast constructor to override explicit template container constructor.
Definition: NonlinearFactorGraph.h:90
Definition: Ordering.h:30
Axis paperHorizontalAxis
The world axis assigned to the horizontal paper axis.
Definition: NonlinearFactorGraph.h:42
boost::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: types.h:62
Formatting options when saving in GraphViz format using NonlinearFactorGraph::saveGraph.
Definition: NonlinearFactorGraph.h:40