public void addRow(int r, Counter other) { // System.out.println("MSG: added row "+r); Counter row = this.getRow(r); if (row.isEmpty()) { mat.put(r, row); rows.add(r); } for (int c : other.keySet()) { cols.add(c); } row.addAll(other); }