swapRows(A,b,pivot_row,k);//swap rows so the pivot is in the right row
}else{
col_index++;
number_pivots_++;
col_index++;//col_index = k +1;
}
}
for(inti=k+1;i<rows;i++){
intunder_pivot=A.coeffRef(i,col_index);
for(intj=col_index;j<cols;j++){//change k+1 to k to eliminate the elements below the pivot
A.coeffRef(i,j)=A.coeffRef(k,col_index)*A.coeffRef(i,j)-under_pivot*A.coeffRef(k,j);//eliminate the rows below the row with pivot, only one pivot per column
std::cout<<"Error in IRREF_Jordan(ExactConstraintSatisfaction.cc) : couldn't find a pivot_col."<<std::endl;
intgcdValue=gcdRow(A.row(i),b.coeffRef(i));//compute the gcd to make the values as small as possible
for(intj=0;j<cols;j++){
A.coeffRef(i,j)=A.coeffRef(i,j)/gcdValue;
for(inti=k-1;i>=0;i--){//eliminate row i with row k
b.coeffRef(i)=(A.coeff(k,pivot_col)*b.coeff(i)-A.coeff(i,pivot_col)*b.coeff(k));//do it in this order, so we don't delete entries in A for the computation of b
eliminate_row(A,i,k);
intgcdValue=gcd_row(A.row(i),b.coeffRef(i));//compute the gcd to make the values as small as possible