public function toMatrix($rebase = true)
    {
        $mArr = [];
        foreach ($this as $vector) {
            $mArr[$vector->getY()][$vector->getX()] = $vector->getValue();
        }

        if ($rebase) {
            return new Matrix($this->rebase($mArr));
        } else {
            return new Matrix($mArr);
        }
    }
public function toMatrix($rebase = true)
    {
        $mArr = [];
        foreach ($this as $vector) {
            $mArr[$vector->getY()][$vector->getX()] = $vector->getValue();
        }

        if ($rebase) {
            return new Matrix($this->rebase($mArr));
        } else {
            return new Matrix($mArr);
        }
    }
public function toMatrix ( $ rebase = true ) { $ mArr = [ ] ; foreach ( $ this as $ vector ) { $ mArr [ $ vector -> getY ( ) ] [ $ vector -> getX ( ) ] = $ vector -> getValue ( ) ; } if ( $ rebase ) { return new Matrix ( $ this -> rebase ( $ mArr ) ) ; } else { return new Matrix ( $ mArr ) ; } }
Convert vector set to a matrix where row == y, col == x

@param boolean $rebase Rebase vector entries to 0,0
@return \Chippyash\Matrix\Matrix
Convert vector set to a matrix where row == y col == x