40 #include <visp3/core/vpColVector.h>
41 #include <visp3/core/vpConfig.h>
42 #include <visp3/core/vpMatrix.h>
64 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
124 vpColVector &x, std::vector<BoundedIndex> l = {}, std::vector<BoundedIndex> u = {},
125 const double &tol = 1e-6);
132 static bool colReduction(
vpMatrix &A,
vpColVector &b,
bool full_rank =
false,
const double &tol = 1e-6);
149 for (
unsigned int i = 0; i < x.
getRows(); ++i) {
150 if (std::abs(x[i]) > tol)
168 for (
unsigned int i = 0; i < b.
getRows(); ++i) {
169 if (std::abs(A.
getRow(i) * x - b[i]) > tol)
186 for (
unsigned int i = 0; i < d.getRows(); ++i) {
187 if (C.
getRow(i) * x - d[i] > thr)
203 for (
unsigned int i = 0; i < x.
getRows(); ++i) {
220 for (
unsigned int i = 0; i < x.
getRows(); ++i) {
unsigned int getRows() const
Implementation of column vector and the associated operations.
This class provides two solvers for Linear Programs.
static bool allGreater(const vpColVector &x, const double &thr=1e-6)
static bool allLesser(const vpColVector &x, const double &thr=1e-6)
static bool allZero(const vpColVector &x, const double &tol=1e-6)
static bool allLesser(const vpMatrix &C, const vpColVector &x, const vpColVector &d, const double &thr=1e-6)
static bool allClose(const vpMatrix &A, const vpColVector &x, const vpColVector &b, const double &tol=1e-6)
std::pair< unsigned int, double > BoundedIndex
Implementation of a matrix and operations on matrices.
vpRowVector getRow(unsigned int i) const