Derive factors from gtsam::Factor
parent
e1802814ca
commit
40e5a1a6ab
|
@ -31,13 +31,11 @@ string html(const gtsam::DiscreteValues& values,
|
|||
std::map<gtsam::Key, std::vector<std::string>> names);
|
||||
|
||||
#include <gtsam/discrete/DiscreteFactor.h>
|
||||
class DiscreteFactor {
|
||||
virtual class DiscreteFactor : gtsam::Factor {
|
||||
void print(string s = "DiscreteFactor\n",
|
||||
const gtsam::KeyFormatter& keyFormatter =
|
||||
gtsam::DefaultKeyFormatter) const;
|
||||
bool equals(const gtsam::DiscreteFactor& other, double tol = 1e-9) const;
|
||||
bool empty() const;
|
||||
size_t size() const;
|
||||
double operator()(const gtsam::DiscreteValues& values) const;
|
||||
};
|
||||
|
||||
|
@ -225,6 +223,8 @@ class DiscreteBayesTree {
|
|||
bool empty() const;
|
||||
const DiscreteBayesTreeClique* operator[](size_t j) const;
|
||||
|
||||
double evaluate(const gtsam::DiscreteValues& values) const;
|
||||
|
||||
string dot(const gtsam::KeyFormatter& keyFormatter =
|
||||
gtsam::DefaultKeyFormatter) const;
|
||||
void saveGraph(string s,
|
||||
|
|
|
@ -35,14 +35,11 @@ class HybridValues {
|
|||
};
|
||||
|
||||
#include <gtsam/hybrid/HybridFactor.h>
|
||||
virtual class HybridFactor {
|
||||
virtual class HybridFactor : gtsam::Factor {
|
||||
void print(string s = "HybridFactor\n",
|
||||
const gtsam::KeyFormatter& keyFormatter =
|
||||
gtsam::DefaultKeyFormatter) const;
|
||||
bool equals(const gtsam::HybridFactor& other, double tol = 1e-9) const;
|
||||
bool empty() const;
|
||||
size_t size() const;
|
||||
gtsam::KeyVector keys() const;
|
||||
|
||||
// Standard interface:
|
||||
double error(const gtsam::HybridValues &values) const;
|
||||
|
|
|
@ -197,4 +197,15 @@ class VariableIndex {
|
|||
size_t nEntries() const;
|
||||
};
|
||||
|
||||
#include <gtsam/inference/Factor.h>
|
||||
virtual class Factor {
|
||||
void print(string s = "Factor\n", const gtsam::KeyFormatter& keyFormatter =
|
||||
gtsam::DefaultKeyFormatter) const;
|
||||
void printKeys(string s = "") const;
|
||||
bool equals(const gtsam::Factor& other, double tol = 1e-9) const;
|
||||
bool empty() const;
|
||||
size_t size() const;
|
||||
gtsam::KeyVector keys() const;
|
||||
};
|
||||
|
||||
} // namespace gtsam
|
||||
|
|
|
@ -261,8 +261,7 @@ class VectorValues {
|
|||
};
|
||||
|
||||
#include <gtsam/linear/GaussianFactor.h>
|
||||
virtual class GaussianFactor {
|
||||
gtsam::KeyVector keys() const;
|
||||
virtual class GaussianFactor : gtsam::Factor {
|
||||
void print(string s = "", const gtsam::KeyFormatter& keyFormatter =
|
||||
gtsam::DefaultKeyFormatter) const;
|
||||
bool equals(const gtsam::GaussianFactor& lf, double tol) const;
|
||||
|
@ -273,8 +272,6 @@ virtual class GaussianFactor {
|
|||
Matrix information() const;
|
||||
Matrix augmentedJacobian() const;
|
||||
pair<Matrix, Vector> jacobian() const;
|
||||
size_t size() const;
|
||||
bool empty() const;
|
||||
};
|
||||
|
||||
#include <gtsam/linear/JacobianFactor.h>
|
||||
|
@ -301,10 +298,7 @@ virtual class JacobianFactor : gtsam::GaussianFactor {
|
|||
//Testable
|
||||
void print(string s = "", const gtsam::KeyFormatter& keyFormatter =
|
||||
gtsam::DefaultKeyFormatter) const;
|
||||
void printKeys(string s) const;
|
||||
gtsam::KeyVector& keys() const;
|
||||
bool equals(const gtsam::GaussianFactor& lf, double tol) const;
|
||||
size_t size() const;
|
||||
Vector unweighted_error(const gtsam::VectorValues& c) const;
|
||||
Vector error_vector(const gtsam::VectorValues& c) const;
|
||||
double error(const gtsam::VectorValues& c) const;
|
||||
|
@ -346,10 +340,8 @@ virtual class HessianFactor : gtsam::GaussianFactor {
|
|||
HessianFactor(const gtsam::GaussianFactorGraph& factors);
|
||||
|
||||
//Testable
|
||||
size_t size() const;
|
||||
void print(string s = "", const gtsam::KeyFormatter& keyFormatter =
|
||||
gtsam::DefaultKeyFormatter) const;
|
||||
void printKeys(string s) const;
|
||||
bool equals(const gtsam::GaussianFactor& lf, double tol) const;
|
||||
double error(const gtsam::VectorValues& c) const;
|
||||
|
||||
|
|
|
@ -110,13 +110,10 @@ class NonlinearFactorGraph {
|
|||
};
|
||||
|
||||
#include <gtsam/nonlinear/NonlinearFactor.h>
|
||||
virtual class NonlinearFactor {
|
||||
virtual class NonlinearFactor : gtsam::Factor {
|
||||
// Factor base class
|
||||
size_t size() const;
|
||||
gtsam::KeyVector keys() const;
|
||||
void print(string s = "", const gtsam::KeyFormatter& keyFormatter =
|
||||
gtsam::DefaultKeyFormatter) const;
|
||||
void printKeys(string s) const;
|
||||
// NonlinearFactor
|
||||
bool equals(const gtsam::NonlinearFactor& other, double tol) const;
|
||||
double error(const gtsam::Values& c) const;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
namespace gtsam {
|
||||
|
||||
#include <gtsam/symbolic/SymbolicFactor.h>
|
||||
virtual class SymbolicFactor {
|
||||
virtual class SymbolicFactor : gtsam::Factor {
|
||||
// Standard Constructors and Named Constructors
|
||||
SymbolicFactor(const gtsam::SymbolicFactor& f);
|
||||
SymbolicFactor();
|
||||
|
@ -18,12 +18,10 @@ virtual class SymbolicFactor {
|
|||
static gtsam::SymbolicFactor FromKeys(const gtsam::KeyVector& js);
|
||||
|
||||
// From Factor
|
||||
size_t size() const;
|
||||
void print(string s = "SymbolicFactor",
|
||||
const gtsam::KeyFormatter& keyFormatter =
|
||||
gtsam::DefaultKeyFormatter) const;
|
||||
bool equals(const gtsam::SymbolicFactor& other, double tol) const;
|
||||
gtsam::KeyVector keys();
|
||||
};
|
||||
|
||||
#include <gtsam/symbolic/SymbolicFactorGraph.h>
|
||||
|
@ -161,6 +159,9 @@ class SymbolicBayesTree {
|
|||
gtsam::SymbolicConditional* marginalFactor(size_t key) const;
|
||||
gtsam::SymbolicFactorGraph* joint(size_t key1, size_t key2) const;
|
||||
gtsam::SymbolicBayesNet* jointBayesNet(size_t key1, size_t key2) const;
|
||||
|
||||
string dot(const gtsam::KeyFormatter& keyFormatter =
|
||||
gtsam::DefaultKeyFormatter) const;
|
||||
};
|
||||
|
||||
class SymbolicBayesTreeClique {
|
||||
|
|
Loading…
Reference in New Issue