void F4GB::show_matrix() { // Debugging routine MutableMatrix *q = F4toM2Interface::to_M2_MutableMatrix(KK,mat,gens,gb); buffer o; q->text_out(o); emit(o.str()); }
void F4GB::show_new_rows_matrix() { int ncols = INTSIZE(mat->columns); int nrows = 0; for (int nr=0; nr<mat->rows.size(); nr++) if (is_new_GB_row(nr)) nrows++; MutableMatrix *gbM = IM2_MutableMatrix_make(KK->get_ring(), nrows, ncols, false); int r = -1; for (int nr=0; nr<mat->rows.size(); nr++) if (is_new_GB_row(nr)) { r++; row_elem &row = mat->rows[nr]; ring_elem *rowelems = newarray(ring_elem, row.len); if (row.coeffs == 0) { if (row.monom == 0) KK->to_ringelem_array(row.len, gens[row.elem]->f.coeffs, rowelems); else KK->to_ringelem_array(row.len, gb[row.elem]->f.coeffs, rowelems); } else { KK->to_ringelem_array(row.len, row.coeffs, rowelems); } for (int i=0; i<row.len; i++) { int c = row.comps[i]; gbM->set_entry(r,c,rowelems[i]); } deletearray(rowelems); } buffer o; gbM->text_out(o); emit(o.str()); }