public function getRow(int $y, BitArray $row = null) : BitArray
    {
        if (null === $row || $row->getSize() < $this->width) {
            $row = new BitArray($this->width);
        }

        $offset = $y * $this->rowSize;

        for ($x = 0; $x < $this->rowSize; ++$x) {
            $row->setBulk($x << 5, $this->bits[$offset + $x]);
        }

        return $row;
    }
public function getRow(int $y, BitArray $row = null) : BitArray
    {
        if (null === $row || $row->getSize() < $this->width) {
            $row = new BitArray($this->width);
        }

        $offset = $y * $this->rowSize;

        for ($x = 0; $x < $this->rowSize; ++$x) {
            $row->setBulk($x << 5, $this->bits[$offset + $x]);
        }

        return $row;
    }
public function getRow ( int $ y , BitArray $ row = null ) : BitArray { if ( null === $ row || $ row -> getSize ( ) < $ this -> width ) { $ row = new BitArray ( $ this -> width ) ; } $ offset = $ y * $ this -> rowSize ; for ( $ x = 0 ; $ x < $ this -> rowSize ; ++ $ x ) { $ row -> setBulk ( $ x << 5 , $ this -> bits [ $ offset + $ x ] ) ; } return $ row ; }
A fast method to retrieve one row of data from the matrix as a BitArray.
A fast method to retrieve one row of data from the matrix as a BitArray .