Function Utils::containsConstraint(const arma::sp_mat&, const arma::vec&, const arma::sp_mat&, const double&, const double)
Defined in File utils.h
Function Documentation
-
bool Utils::containsConstraint(const arma::sp_mat &A, const arma::vec &b, const arma::sp_mat &lhs, const double &rhs, const double tol = 1e-6)
Given a matrix
A
and a vector of LHSsb
, checks if bothlhs
is inA
, andrhs
is inb
up to a tolerance oftol
.- Parameters
A – The matrix containing the constraints
b – The vector containing the RHSs
lhs – The input cut RHS (in a matrix form)
rhs – The input cut LHS
tol – A numerical tolerance
- Returns
True if the constraint was found