tableRow & tableBlock::curRow() { if(rows.size() == 0) genRow(); return rows[rows.size() - 1]; }
void Constraint::printRow(ostream &out, Active<Variable, Constraint> *var) const { Row row(master_, var->number()); genRow(var, row); out << row; }
double Constraint::distance(double *x, Active<Variable, Constraint> *actVar) const { Row a(master_, actVar->number()); int nnz = genRow(actVar, a); double ax = 0.0; for (int i = 0; i < nnz; i++) ax += a.coeff(i) * x[a.support(i)]; return fabs((rhs() - ax)/a.norm()); }