mirror of
https://bitbucket.org/Mattrixwv/matrix.git
synced 2025-12-06 23:13:57 -05:00
Changed private to protected for future overloading
This commit is contained in:
@@ -13,10 +13,10 @@ import com.mattrixwv.matrix.exceptions.InvalidRowSizeException;
|
||||
|
||||
|
||||
public class IntegerMatrix{
|
||||
private int[][] grid;
|
||||
protected int[][] grid;
|
||||
|
||||
//Helper functions
|
||||
private void setGrid(int[][] grid){
|
||||
protected void setGrid(int[][] grid){
|
||||
if(grid.length == 0){
|
||||
grid = new int[0][0];
|
||||
}
|
||||
@@ -44,7 +44,7 @@ public class IntegerMatrix{
|
||||
this.grid = newGrid;
|
||||
}
|
||||
}
|
||||
private int[][] copyGrid(){
|
||||
protected int[][] copyGrid(){
|
||||
//Allocate memory for the new grid
|
||||
int[][] newGrid = new int[grid.length][grid[0].length];
|
||||
|
||||
@@ -58,7 +58,7 @@ public class IntegerMatrix{
|
||||
//Return the new grid
|
||||
return newGrid;
|
||||
}
|
||||
private boolean isSquare(){
|
||||
protected boolean isSquare(){
|
||||
if(getNumRows() == 0){
|
||||
return false;
|
||||
}
|
||||
@@ -67,7 +67,7 @@ public class IntegerMatrix{
|
||||
}
|
||||
}
|
||||
//Returns a matrix with the supplied row and column removed
|
||||
private IntegerMatrix laplaceExpansionHelper(int row, int col){
|
||||
protected IntegerMatrix laplaceExpansionHelper(int row, int col){
|
||||
//Make sure the matrix is square
|
||||
if(!isSquare()){
|
||||
throw new InvalidGeometryException("A matrix must be square for you to perform Laplace Expansion");
|
||||
|
||||
Reference in New Issue
Block a user