Coding style cleanup
[libstick.git] / include / libstick-0.1 / matrixreduction.h
index 60d8397f895893e8eb848434635441db2a7535d3..d9624cc1200f6b1f522d0b1711adb0c69a7eb941 100644 (file)
@@ -14,12 +14,12 @@ namespace libstick {
  * invariant.  Hence, the resulting b is equal to the product of the boundary
  * matrix times v. */
 template<class IT, class D>
-void reduceBoundaryMatrix(BooleanColRowMatrix<IT> &b, BooleanColMatrix_base<IT, D> &v) {
+void reduce_boundary_matrix(boolean_colrowmatrix<IT> &b, boolean_colmatrix_base<IT, D> &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<IT>::colbase::column_type &col = b.getColumn(c);
+        const typename boolean_colrowmatrix<IT>::colbase::column_type &col = b.get_column(c);
         if (col.size() == 0)
             continue;
 
@@ -28,19 +28,19 @@ void reduceBoundaryMatrix(BooleanColRowMatrix<IT> &b, BooleanColMatrix_base<IT,
         assert(b.get(r, c));
 
         // Get a copy of the r-th row
-        typename BooleanColRowMatrix<IT>::rowbase::row_type row(b.getRow(r).size());
-        copy(b.getRow(r).begin(), b.getRow(r).end(), row.begin());
+        typename boolean_colrowmatrix<IT>::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<IT>::row_type::const_iterator it = lower_bound(row.begin(), row.end(), c);
+        typename boolean_colrowmatrix<IT>::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));
         }
     }