X-Git-Url: https://git.sthu.org/?p=libstick.git;a=blobdiff_plain;f=include%2Flibstick-0.1%2Fmatrixreduction.h;h=d9624cc1200f6b1f522d0b1711adb0c69a7eb941;hp=60d8397f895893e8eb848434635441db2a7535d3;hb=88ea14f1e9079c9b8c4af7aff01a3fe960e9472b;hpb=929c696bfb48aa0f96ce2b70b1b926b5f2b2dede diff --git a/include/libstick-0.1/matrixreduction.h b/include/libstick-0.1/matrixreduction.h index 60d8397..d9624cc 100644 --- a/include/libstick-0.1/matrixreduction.h +++ b/include/libstick-0.1/matrixreduction.h @@ -14,12 +14,12 @@ namespace libstick { * invariant. Hence, the resulting b is equal to the product of the boundary * matrix times v. */ template -void reduceBoundaryMatrix(BooleanColRowMatrix &b, BooleanColMatrix_base &v) { +void reduce_boundary_matrix(boolean_colrowmatrix &b, boolean_colmatrix_base &v) { assert(b.size() == v.width()); // Make every column reduced, i.e., it is a zero-column or contains only one 1. for (unsigned c=0; c < b.size(); ++c) { - const typename BooleanColRowMatrix::colbase::column_type &col = b.getColumn(c); + const typename boolean_colrowmatrix::colbase::column_type &col = b.get_column(c); if (col.size() == 0) continue; @@ -28,19 +28,19 @@ void reduceBoundaryMatrix(BooleanColRowMatrix &b, BooleanColMatrix_base::rowbase::row_type row(b.getRow(r).size()); - copy(b.getRow(r).begin(), b.getRow(r).end(), row.begin()); + typename boolean_colrowmatrix::rowbase::row_type row(b.get_row(r).size()); + copy(b.get_row(r).begin(), b.get_row(r).end(), row.begin()); assert(row.size() >= 1); // Get rid of 1s at that row right of column c. - typename BooleanColRowMatrix::row_type::const_iterator it = lower_bound(row.begin(), row.end(), c); + typename boolean_colrowmatrix::row_type::const_iterator it = lower_bound(row.begin(), row.end(), c); for(; it != row.end(); ++it) { if (*it <= c) continue; assert(b.get(r, *it)); - b.addColumn(*it, col); - v.addColumn(*it, v.getColumn(c)); + b.add_column(*it, col); + v.add_column(*it, v.get_column(c)); assert(!b.get(r, *it)); } }