public getBit(col: number, row: number): boolean {
    return this.bits[row * this.numcols + col] === 1;
  }