gtsam  4.1.0
gtsam
LPInitSolver.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
20 #pragma once
21 
24 
25 namespace gtsam {
52 class LPInitSolver {
53 private:
54  const LP& lp_;
55 
56 public:
58  LPInitSolver(const LP& lp) : lp_(lp) {}
59 
61  VectorValues solve() const;
62 
63 private:
65  LP::shared_ptr buildInitialLP(Key yKey) const;
66 
71  GaussianFactorGraph::shared_ptr buildInitOfInitGraph() const;
72 
74  double compute_y0(const VectorValues& x0) const;
75 
77  std::vector<std::pair<Key, Matrix>> collectTerms(
78  const LinearInequality& factor) const;
79 
81  InequalityFactorGraph addSlackVariableToInequalities(Key yKey,
82  const InequalityFactorGraph& inequalities) const;
83 
84  // friend class for unit-testing private methods
85  friend class LPInitSolverInitializationTest;
86 };
87 
88 }
gtsam::LPInitSolver
This LPInitSolver implements the strategy in Matlab: http://www.mathworks.com/help/optim/ug/linear-pr...
Definition: LPInitSolver.h:52
GaussianFactorGraph.h
Linear Factor Graph where all factors are Gaussians.
gtsam::LP
Data structure of a Linear Program.
Definition: LP.h:51
gtsam::Key
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:61
gtsam::VectorValues
This class represents a collection of vector-valued variables associated each with a unique integer i...
Definition: VectorValues.h:74
gtsam::LPInitSolver::LPInitSolver
LPInitSolver(const LP &lp)
Construct with an LP problem.
Definition: LPInitSolver.h:58
gtsam
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
gtsam::LPInitSolver::solve
VectorValues solve() const
Definition: LPInitSolver.cpp:27
gtsam::InequalityFactorGraph
Collection of all Linear Inequality constraints Ax-b <= 0 of a Programming problem as a Factor Graph.
Definition: InequalityFactorGraph.h:32
LP.h
Struct used to hold a Linear Programming Problem.
gtsam::GaussianFactorGraph::shared_ptr
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
Definition: GaussianFactorGraph.h:74
gtsam::LinearInequality
This class defines a linear inequality constraint Ax-b <= 0, inheriting JacobianFactor with the speci...
Definition: LinearInequality.h:33