code: @Override
      boolean add(int n, int m) {
  
          if (!matrix.get(n, m)) return false;
  
          // fix the mapping
          matrix.markRow(n, -(n + 1));
          matrix.set(n, m);
  
          // attempt to refine the mapping
          if (refine(n)) {
              size = size + 1;
              m1[n] = m;
              m2[m] = n;
              return true;
          } else {
              // mapping became invalid - unfix mapping
              matrix.resetRows(n, -(n + 1));
              return false;
          }
      }
docs: {@inheritDoc}