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 
72 
74  double compute_y0(const VectorValues& x0) const;
75 
77  std::vector<std::pair<Key, Matrix>> collectTerms(
78  const LinearInequality& factor) const;
79 
82  const InequalityFactorGraph& inequalities) const;
83 
84  // friend class for unit-testing private methods
86 };
87 
88 }
double compute_y0(const VectorValues &x0) const
y = max_j ( Cj*x0 - dj ) – due to the inequality constraints y >= Cx - d
std::shared_ptr< LP > shared_ptr
Definition: LP.h:52
LP::shared_ptr buildInitialLP(Key yKey) const
build initial LP
Definition: LP.h:51
InequalityFactorGraph addSlackVariableToInequalities(Key yKey, const InequalityFactorGraph &inequalities) const
Turn Cx <= d into Cx - y <= d factors.
Linear Factor Graph where all factors are Gaussians.
std::shared_ptr< This > shared_ptr
shared_ptr to this class
VectorValues solve() const
traits
Definition: chartTesting.h:28
static Symbol x0('x', 0)
GaussianFactorGraph::shared_ptr buildInitOfInitGraph() const
Struct used to hold a Linear Programming Problem.
LPInitSolver(const LP &lp)
Construct with an LP problem.
Definition: LPInitSolver.h:58
friend class LPInitSolverInitializationTest
Definition: LPInitSolver.h:85
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:102
std::vector< std::pair< Key, Matrix > > collectTerms(const LinearInequality &factor) const
Collect all terms of a factor into a container.


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:35