QPSolver.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 
25 #include <limits>
26 #include <algorithm>
27 
28 namespace gtsam {
29 
31 struct QPPolicy {
34  static constexpr double maxAlpha = 1.0;
35 
37  static const GaussianFactorGraph buildCostFunction(const QP& qp,
38  const VectorValues& xk = VectorValues()) {
39  GaussianFactorGraph no_constant_factor;
40  for (auto factor : qp.cost) {
41  HessianFactor hf = static_cast<HessianFactor>(*factor);
42  no_constant_factor.push_back(hf);
43  }
44  return no_constant_factor;
45  }
46 };
47 
49 
50 }
gtsam::HessianFactor
A Gaussian factor using the canonical parameters (information form)
Definition: HessianFactor.h:100
gtsam::QPPolicy
Policy for ActivetSetSolver to solve Linear Programming.
Definition: QPSolver.h:31
gtsam::ActiveSetSolver
Definition: ActiveSetSolver.h:36
QPInitSolver.h
This finds a feasible solution for a QP problem.
gtsam::GaussianFactorGraph
Definition: GaussianFactorGraph.h:73
gtsam::QPPolicy::buildCostFunction
static const GaussianFactorGraph buildCostFunction(const QP &qp, const VectorValues &xk=VectorValues())
Simply the cost of the QP problem.
Definition: QPSolver.h:37
gtsam::VectorValues
Definition: VectorValues.h:74
ActiveSetSolver.h
Active set method for solving LP, QP problems.
gtsam::QP
Definition: QP.h:31
gtsam
traits
Definition: SFMdata.h:40
gtsam::FactorGraph::push_back
IsDerived< DERIVEDFACTOR > push_back(std::shared_ptr< DERIVEDFACTOR > factor)
Add a factor directly using a shared_ptr.
Definition: FactorGraph.h:147
QP.h
Factor graphs of a Quadratic Programming problem.
gtsam::QP::cost
GaussianFactorGraph cost
Quadratic cost factors.
Definition: QP.h:32
gtsam::QPPolicy::maxAlpha
static constexpr double maxAlpha
Definition: QPSolver.h:34


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:03:54