45 #include <visp3/core/vpColVector.h>
46 #include <visp3/core/vpConfig.h>
47 #include <visp3/core/vpMatrix.h>
65 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
126 vpColVector &x, std::vector<BoundedIndex> l = {}, std::vector<BoundedIndex> u = {},
127 const double &tol = 1e-6);
134 static bool colReduction(
vpMatrix &A,
vpColVector &b,
bool full_rank =
false,
const double &tol = 1e-6);
151 for (
unsigned int i = 0; i < x.
getRows(); ++i) {
152 if (std::abs(x[i]) > tol)
170 for (
unsigned int i = 0; i < b.
getRows(); ++i) {
171 if (std::abs(A.
getRow(i) * x - b[i]) > tol)
188 for (
unsigned int i = 0; i < d.getRows(); ++i) {
189 if (C.
getRow(i) * x - d[i] > thr)
205 for (
unsigned int i = 0; i < x.
getRows(); ++i) {
222 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