37 typedef std::shared_ptr<InequalityFactorGraph> shared_ptr;
41 const std::string& str =
"",
42 const KeyFormatter& keyFormatter = DefaultKeyFormatter)
const override {
52 template <
class... Args>
void add(Args &&... args) {
53 emplace_shared<LinearInequality>(std::forward<Args>(args)...);
62 if (factor->error(x) > 1e-7)
63 return std::numeric_limits<double>::infinity();
void add(Args &&... args)
Add a linear inequality, forwards arguments to LinearInequality.
Definition: InequalityFactorGraph.h:52
bool equals(const This &fg, double tol=1e-9) const
Check equality up to tolerance.
Definition: FactorGraph-inst.h:50
Definition: Testable.h:152
Definition: BayesTree.h:34
Definition: InequalityFactorGraph.h:32
bool equals(const InequalityFactorGraph &other, double tol=1e-9) const
Definition: InequalityFactorGraph.h:47
virtual void print(const std::string &s="FactorGraph", const KeyFormatter &formatter=DefaultKeyFormatter) const
Print out graph to std::cout, with optional key formatter.
Definition: FactorGraph-inst.h:37
Definition: VectorValues.h:74
double error(const VectorValues &x) const
Definition: InequalityFactorGraph.h:59
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
Definition: chartTesting.h:28
void print(const std::string &str="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
Definition: InequalityFactorGraph.h:40
std::shared_ptr< LinearInequality > sharedFactor
Shared pointer to a factor.
Definition: FactorGraph.h:105
LinearInequality derived from Base with constrained noise model.