36 class GaussianFactorGraph;
39 class GaussianBayesNet;
40 class GaussianEliminationTree;
41 class GaussianBayesTree;
42 class GaussianJunctionTree;
54 static std::pair<std::shared_ptr<ConditionalType>, std::shared_ptr<FactorType> >
60 const FactorGraphType&
graph,
61 std::optional<std::reference_wrapper<const VariableIndex>> variableIndex) {
99 template<
typename ITERATOR>
103 template<
class CONTAINER>
107 template<
class DERIVEDFACTOR>
114 bool equals(
const This& fg,
double tol = 1
e-9)
const;
153 template<
class TERMS>
165 std::map<Key, size_t> getKeyDimMap()
const;
207 std::vector<std::tuple<int, int, double> > sparseJacobian(
211 std::vector<std::tuple<int, int, double> > sparseJacobian()
const;
219 Matrix sparseJacobian_()
const;
237 Matrix augmentedJacobian()
const;
255 std::pair<Matrix,Vector> jacobian()
const;
281 Matrix augmentedHessian()
const;
297 std::pair<Matrix,Vector> hessian()
const;
303 virtual std::map<Key,Matrix> hessianBlockDiagonal()
const;
310 const Eliminate&
function = EliminationTraitsType::DefaultEliminate)
const;
317 const Eliminate&
function = EliminationTraitsType::DefaultEliminate)
const;
390 void multiplyInPlace(
const VectorValues&
x,
const Errors::iterator&
e)
const;
394 const std::string&
str =
"GaussianFactorGraph: ",
396 const std::function<
bool(
const Factor* ,
399 [](
const Factor*,
double,
size_t) {
return true; })
const;
403 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 405 friend class boost::serialization::access;
406 template<
class ARCHIVE>
407 void serialize(ARCHIVE & ar,
const unsigned int ) {
408 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
const Symbol key3('v', 3)
GaussianFactorGraph FactorGraphType
Type of the factor graph (e.g. GaussianFactorGraph)
std::string serialize(const T &input)
serializes to a string
friend bool operator==(const GaussianFactorGraph &lhs, const GaussianFactorGraph &rhs)
Check exact equality.
Variable elimination algorithms for factor graphs.
noiseModel::Diagonal::shared_ptr model
GaussianEliminationTree EliminationTreeType
Type of elimination tree.
bool isEqual(const FactorGraph &other) const
Check exact equality of the factor pointers. Useful for derived ==.
A factor with a quadratic error function - a Gaussian.
const GaussianFactorGraph factors
std::pair< std::shared_ptr< GaussianConditional >, std::shared_ptr< GaussianFactor > > EliminatePreferCholesky(const GaussianFactorGraph &factors, const Ordering &keys)
GaussianFactorGraph(const FactorGraph< DERIVEDFACTOR > &graph)
virtual GaussianFactor::shared_ptr clone() const =0
static std::pair< std::shared_ptr< ConditionalType >, std::shared_ptr< FactorType > > DefaultEliminate(const FactorGraphType &factors, const Ordering &keys)
The default dense elimination function.
Point2 operator*(double s, const Point2 &p)
multiply with scalar
NonlinearFactorGraph graph
static const KeyFormatter DefaultKeyFormatter
static enum @1107 ordering
Continuous multi-dimensional vectors for.
static Ordering Colamd(const FACTOR_GRAPH &graph)
GaussianFactorGraph(std::initializer_list< sharedFactor > factors)
static Ordering DefaultOrderingFunc(const FactorGraphType &graph, std::optional< std::reference_wrapper< const VariableIndex >> variableIndex)
The default ordering generation function.
void add(const GaussianFactor &factor)
GaussianJunctionTree JunctionTreeType
GaussianFactorGraph(ITERATOR firstFactor, ITERATOR lastFactor)
const Symbol key1('v', 1)
EliminateableFactorGraph< This > BaseEliminateable
Typedef to base elimination class.
void add(Key key1, const Matrix &A1, Key key2, const Matrix &A2, Key key3, const Matrix &A3, const Vector &b, const SharedDiagonal &model=SharedDiagonal())
Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
Contains the HessianFactor class, a general quadratic factor.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
std::shared_ptr< This > shared_ptr
shared_ptr to this class
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
noiseModel::Diagonal::shared_ptr SharedDiagonal
GaussianFactorGraph(const CONTAINER &factors)
GaussianConditional ConditionalType
Type of conditionals from elimination.
GaussianBayesTree BayesTreeType
Type of Bayes tree.
void add(Key key1, const Matrix &A1, Key key2, const Matrix &A2, const Vector &b, const SharedDiagonal &model=SharedDiagonal())
void add(Key key1, const Matrix &A1, const Vector &b, const SharedDiagonal &model=SharedDiagonal())
GaussianBayesNet BayesNetType
Type of Bayes net from sequential elimination.
GaussianFactor FactorType
Type of factors in factor graph.
GaussianFactorGraph This
Typedef to this class.
void add(const Vector &b)
graph add(PriorFactor< Pose2 >(1, priorMean, priorNoise))
FactorGraph< GaussianFactor > Base
Typedef to base factor graph type.
void add(const sharedFactor &factor)
std::shared_ptr< GaussianFactor > sharedFactor
Shared pointer to a factor.
void add(const TERMS &terms, const Vector &b, const SharedDiagonal &model=SharedDiagonal())
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
bool hasConstraints(const GaussianFactorGraph &factors)
std::uint64_t Key
Integer nonlinear key type.
const Symbol key2('v', 2)