mirror of
https://bitbucket.org/Mattrixwv/matrix.git
synced 2025-12-06 15:03:58 -05:00
Removed redundant function
This commit is contained in:
@@ -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-08-22
|
//Modified: 02-09-22
|
||||||
package com.mattrixwv.matrix;
|
package com.mattrixwv.matrix;
|
||||||
|
|
||||||
|
|
||||||
@@ -392,20 +392,6 @@ public class IntegerMatrix{
|
|||||||
throw new InvalidGeometryException("An identity matrix must have a size > 0");
|
throw new InvalidGeometryException("An identity matrix must have a size > 0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static IntegerMatrix generateFilled(int size, int fill){
|
|
||||||
//Create a grid with the correct size
|
|
||||||
int[][] newGrid = new int[size][size];
|
|
||||||
|
|
||||||
//Set each element in the grid
|
|
||||||
for(int row = 0;row < size;++row){
|
|
||||||
for(int col = 0;col < size;++col){
|
|
||||||
newGrid[row][col] = fill;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Return the new matrix
|
|
||||||
return new IntegerMatrix(newGrid);
|
|
||||||
}
|
|
||||||
public IntegerMatrix add(IntegerMatrix rightSide){
|
public IntegerMatrix add(IntegerMatrix rightSide){
|
||||||
//Make sure the matrices have compatable geometry
|
//Make sure the matrices have compatable geometry
|
||||||
if((getNumRows() != rightSide.getNumRows()) || (getNumCols() != rightSide.getNumCols())){
|
if((getNumRows() != rightSide.getNumRows()) || (getNumCols() != rightSide.getNumCols())){
|
||||||
|
|||||||
Reference in New Issue
Block a user