Go to the documentation of this file.
34 using namespace gtsam;
98 starter.
insert(
Z, Vector::Constant(1, 2.0));
101 expected.insert(
X, Vector::Constant(1, 13.5));
102 expected.insert(
Y, Vector::Constant(1, 6.5));
103 expected.insert(
Z, Vector::Constant(1, -6.5));
115 expected_x0.
insert(1, Vector::Zero(2));
119 double expected_y0 = 0.0;
142 xy0.
insert(yKey, Vector::Constant(1,
y0));
145 expected_init.
insert(1, Vector::Ones(2));
146 expected_init.
insert(2, Vector::Constant(1, -1));
190 init.insert(1, Vector::Zero(2));
195 expected_x1.
insert(1, Vector::Ones(2));
226 double expectedError = 44.0;
static int runAllTests(TestResult &result)
Linear Factor Graph where all factors are Gaussians.
std::shared_ptr< This > shared_ptr
shared_ptr to this class
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Concept check for values that can be used in unit tests.
Factor graph of all LinearEquality factors.
Exception thrown when given Infeasible Initial Values.
iterator insert(const std::pair< Key, Vector > &key_value)
GaussianFactorGraphValuePair Y
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
Factor graph of all LinearInequality factors.
double error(const VectorValues &c) const override
BiCGSTAB< SparseMatrix< double > > solver
double error(const Values &values) const
LinearCost cost
Linear cost factor.
#define DOUBLES_EQUAL(expected, actual, threshold)
bool isFeasible(const VectorValues &x) const
check feasibility
double compute_y0(const VectorValues &x0) const
y = max_j ( Cj*x0 - dj ) – due to the inequality constraints y >= Cx - d
InequalityFactorGraph inequalities
Linear inequality constraints: cI(x) <= 0.
Key symbol(unsigned char c, std::uint64_t j)
std::pair< VectorValues, VectorValues > optimize(const VectorValues &initialValues, const VectorValues &duals=VectorValues(), bool useWarmStart=false) const
detail::initimpl::constructor< Args... > init()
Binds an existing constructor taking arguments Args...
GaussianFactorGraph::shared_ptr buildInitOfInitGraph() const
This finds a feasible solution for an LP problem.
static const Vector kZero
Policy of ActiveSetSolver to solve Linear Programming Problems.
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
std::map< std::string, Array< float, 1, 8, DontAlign|RowMajor > > results
TEST(LPSolver, OverConstrainedLinearSystem)
GaussianFactorGraph buildWorkingGraph(const InequalityFactorGraph &workingSet, const VectorValues &xk=VectorValues()) const
VectorValues optimize(const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
IsDerived< DERIVEDFACTOR > add(std::shared_ptr< DERIVEDFACTOR > factor)
add is a synonym for push_back.
VectorValues solve() const
NonlinearFactorGraph graph
std::uint64_t Key
Integer nonlinear key type.
LP::shared_ptr buildInitialLP(Key yKey) const
build initial LP
void add(Args &&... args)
Add a linear inequality, forwards arguments to LinearInequality.
std::shared_ptr< LP > shared_ptr
gtsam
Author(s):
autogenerated on Wed May 28 2025 03:06:50