Created LongMatrix

This commit is contained in:
2022-02-10 16:08:39 +00:00
parent 55244130ca
commit bbd662c8b6

View File

@@ -1,7 +1,7 @@
//Matrix/src/main/java/com/mattrixwv/IntegerMatrix.java //Matrix/src/main/java/com/mattrixwv/IntegerMatrix.java
//Mattrixwv //Mattrixwv
// Created: 02-01-22 // Created: 02-01-22
//Modified: 02-09-22 //Modified: 02-10-22
package com.mattrixwv.matrix; package com.mattrixwv.matrix;
@@ -19,10 +19,10 @@ public class IntegerMatrix{
//Helper functions //Helper functions
protected void setGrid(int[][] grid){ protected void setGrid(int[][] grid){
if(grid.length == 0){ if(grid.length == 0){
grid = new int[0][0]; this.grid = new int[0][0];
} }
else if(grid[0].length == 0){ else if(grid[0].length == 0){
grid = new int[grid.length][0]; this.grid = new int[grid.length][0];
} }
else{ else{
//Make sure all rows are the same length //Make sure all rows are the same length