private Matrix getSubmatrix(Matrix matrix, int currentLine) {
        
        Matrix subMatrix = new Matrix(matrix.size - 1);
        
        for(int rows = 0; rows < subMatrix.size; rows++) {
            for(int columns = 0; columns < subMatrix.size; columns++) {
                subMatrix.setValue(rows, columns,
                        matrix.getValue(rows + 1, (columns >= currentLine)
                        ? columns + 1 : columns));
            }
        }
        
        return subMatrix;
    }