Update test coverage

This commit is contained in:
2023-06-30 21:41:03 -04:00
parent 96fec9d7c2
commit 7efca4a154
9 changed files with 88 additions and 56 deletions

View File

@@ -1,7 +1,7 @@
//Matrix/src/main/java/com/mattrixwv/BigIntegerMatrix.java
//Mattrixwv
// Created: 02-10-22
//Modified: 06-30-22
//Modified: 06-30-23
package com.mattrixwv.matrix;
@@ -68,14 +68,14 @@ public class BigIntegerMatrix{
}
//Returns a matrix with the supplied row and column removed
protected BigIntegerMatrix 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");
}
//Make sure the matrix is large enough to have this operation performed
if((getNumRows() <= 1) || (getNumCols() <= 1)){
throw new InvalidGeometryException("A matrix must be at least 2x2 for you to perform Laplace Expansion: " + getNumRows() + "x" + getNumCols());
}
//Make sure the matrix is square
if(!isSquare()){
throw new InvalidGeometryException("A matrix must be square for you to perform Laplace Expansion");
}
//Make sure the row is valid
if((row < 0) || (row >= getNumRows())){
throw new InvalidCoordinatesException("An invalid row number was supplied: " + row + ". The matrix contains " + getNumRows() + " rows");

View File

@@ -1,7 +1,7 @@
//Matrix/src/main/java/com/mattrixwv/matrix/DoubleMatrix.java
//Mattrixwv
// Created: 02-07-22
//Modified: 06-30-22
//Modified: 06-30-23
package com.mattrixwv.matrix;
@@ -68,14 +68,14 @@ public class DoubleMatrix{
}
//Returns a matrix with the supplied row and column removed
protected DoubleMatrix 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");
}
//Make sure the matrix is large enough to have this operation performed
if((getNumRows() <= 1) || (getNumCols() <= 1)){
throw new InvalidGeometryException("A matrix must be at least 2x2 for you to perform Laplace Expansion: " + getNumRows() + "x" + getNumCols());
}
//Make sure the matrix is square
if(!isSquare()){
throw new InvalidGeometryException("A matrix must be square for you to perform Laplace Expansion");
}
//Make sure the row is valid
if((row < 0) || (row >= getNumRows())){
throw new InvalidCoordinatesException("An invalid row number was supplied: " + row + ". The matrix contains " + getNumRows() + " rows");

View File

@@ -1,7 +1,7 @@
//Matrix/src/main/java/com/mattrixwv/IntegerMatrix.java
//Mattrixwv
// Created: 02-01-22
//Modified: 06-30-22
//Modified: 06-30-23
package com.mattrixwv.matrix;
@@ -67,14 +67,14 @@ public class IntegerMatrix{
}
//Returns a matrix with the supplied row and column removed
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");
}
//Make sure the matrix is large enough to have this operation performed
if((getNumRows() <= 1) || (getNumCols() <= 1)){
throw new InvalidGeometryException("A matrix must be at least 2x2 for you to perform Laplace Expansion: " + getNumRows() + "x" + getNumCols());
}
//Make sure the matrix is square
if(!isSquare()){
throw new InvalidGeometryException("A matrix must be square for you to perform Laplace Expansion");
}
//Make sure the row is valid
if((row < 0) || (row >= getNumRows())){
throw new InvalidCoordinatesException("An invalid row number was supplied: " + row + ". The matrix contains " + getNumRows() + " rows");

View File

@@ -1,7 +1,7 @@
//Matrix/src/main/java/com/mattrixwv/matrix/LongMatrix.java
//Mattrixwv
// Created: 02-10-22
//Modified: 07-01-22
//Modified: 06-30-23
package com.mattrixwv.matrix;
@@ -67,14 +67,14 @@ public class LongMatrix{
}
//Returns a matrix with the supplied row and column removed
protected LongMatrix 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");
}
//Make sure the matrix is large enough to have this operation performed
if((getNumRows() <= 1) || (getNumCols() <= 1)){
throw new InvalidGeometryException("A matrix must be at least 2x2 for you to perform Laplace Expansion: " + getNumRows() + "x" + getNumCols());
}
//Make sure the matrix is square
if(!isSquare()){
throw new InvalidGeometryException("A matrix must be square for you to perform Laplace Expansion");
}
//Make sure the row is valid
if((row < 0) || (row >= getNumRows())){
throw new InvalidCoordinatesException("An invalid row number was supplied: " + row + ". The matrix contains " + getNumRows() + " rows");