21#include <gtsam/config.h>
23#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V43
36class InequalityFactorGraph:
public FactorGraph<LinearInequality> {
38 typedef FactorGraph<LinearInequality> Base;
41 typedef std::shared_ptr<InequalityFactorGraph> shared_ptr;
45 const std::string& str =
"",
46 const KeyFormatter& keyFormatter = DefaultKeyFormatter)
const override {
47 Base::print(str, keyFormatter);
51 bool equals(
const InequalityFactorGraph& other,
double tol = 1e-9)
const {
52 return Base::equals(other, tol);
56 template <
class... Args>
void add(Args &&... args) {
57 emplace_shared<LinearInequality>(std::forward<Args>(args)...);
63 double error(
const VectorValues& x)
const {
64 for (
const sharedFactor& factor : *
this) {
66 if (factor->error(x) > 1e-7)
67 return std::numeric_limits<double>::infinity();
75struct traits<InequalityFactorGraph> :
public Testable<InequalityFactorGraph> {
LinearInequality derived from Base with constrained noise model.
Global functions in a separate testing namespace.
Definition chartTesting.h:28
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:143
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
A factor graph is a bipartite graph with factor nodes connected to variable nodes.
Definition FactorGraph.h:58