Fix sonarqube warnings
This commit is contained in:
4
pom.xml
4
pom.xml
@@ -22,12 +22,12 @@
|
|||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git://bitbucket.org/Mattrixwv/Matrix.git</connection>
|
<connection>scm:git:git://bitbucket.org/Mattrixwv/Matrix.git</connection>
|
||||||
<developerConnection>scm:git:ssh://bitbucket.org:Mattrixwv/Matrix.git</developerConnection>
|
<developerConnection>scm:git:ssh://bitbucket.org:Mattrixwv/Matrix.git</developerConnection>
|
||||||
<url>https://bitbucket.org/Mattrixwv/Matrix/src</url>
|
<url>https://git.mattrixwv.com/BaseLibraries/Matrix</url>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<groupId>com.mattrixwv</groupId>
|
<groupId>com.mattrixwv</groupId>
|
||||||
<artifactId>matrix</artifactId>
|
<artifactId>matrix</artifactId>
|
||||||
<version>1.3.1</version>
|
<version>1.3.2-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>Matrix</name>
|
<name>Matrix</name>
|
||||||
<description>A library for performing Matrix operations</description>
|
<description>A library for performing Matrix operations</description>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,3 @@
|
|||||||
//Matrix/src/test/java/com/mattrixwv/matrix/TestDoubleMatrix.java
|
|
||||||
//Mattrixwv
|
|
||||||
// Created: 02-07-22
|
|
||||||
//Modified: 08-10-24
|
|
||||||
package com.mattrixwv.matrix;
|
package com.mattrixwv.matrix;
|
||||||
|
|
||||||
|
|
||||||
@@ -1773,12 +1769,8 @@ public class TestDoubleMatrix{
|
|||||||
public void testDeterminant_size0(){
|
public void testDeterminant_size0(){
|
||||||
DoubleMatrix matrix = new DoubleMatrix();
|
DoubleMatrix matrix = new DoubleMatrix();
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::determinant);
|
||||||
matrix.determinant();
|
assertThrows(InvalidGeometryException.class, matrix::det);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.det();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -1817,24 +1809,16 @@ public class TestDoubleMatrix{
|
|||||||
public void testDeterminant_size2x10(){
|
public void testDeterminant_size2x10(){
|
||||||
DoubleMatrix matrix = new DoubleMatrix(negativeGrid2x10);
|
DoubleMatrix matrix = new DoubleMatrix(negativeGrid2x10);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::determinant);
|
||||||
matrix.determinant();
|
assertThrows(InvalidGeometryException.class, matrix::det);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.det();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDeterminant_size10x2(){
|
public void testDeterminant_size10x2(){
|
||||||
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10x2);
|
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10x2);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::determinant);
|
||||||
matrix.determinant();
|
assertThrows(InvalidGeometryException.class, matrix::det);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.det();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! cofactor() / cof()
|
//! cofactor() / cof()
|
||||||
@@ -1842,12 +1826,8 @@ public class TestDoubleMatrix{
|
|||||||
public void testCofactor_size0(){
|
public void testCofactor_size0(){
|
||||||
DoubleMatrix matrix = new DoubleMatrix();
|
DoubleMatrix matrix = new DoubleMatrix();
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::cofactor);
|
||||||
matrix.cofactor();
|
assertThrows(InvalidGeometryException.class, matrix::cof);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.cof();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -1892,24 +1872,16 @@ public class TestDoubleMatrix{
|
|||||||
public void testCofactor_size2x10(){
|
public void testCofactor_size2x10(){
|
||||||
DoubleMatrix matrix = new DoubleMatrix(negativeGrid2x10);
|
DoubleMatrix matrix = new DoubleMatrix(negativeGrid2x10);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::cofactor);
|
||||||
matrix.cofactor();
|
assertThrows(InvalidGeometryException.class, matrix::cof);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.cof();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCofactor_size10x2(){
|
public void testCofactor_size10x2(){
|
||||||
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10x2);
|
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10x2);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::cofactor);
|
||||||
matrix.cofactor();
|
assertThrows(InvalidGeometryException.class, matrix::cof);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.cof();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! adjoint() / adj()
|
//! adjoint() / adj()
|
||||||
@@ -1917,12 +1889,8 @@ public class TestDoubleMatrix{
|
|||||||
public void testAdjoint_size0(){
|
public void testAdjoint_size0(){
|
||||||
DoubleMatrix matrix = new DoubleMatrix();
|
DoubleMatrix matrix = new DoubleMatrix();
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::adjoint);
|
||||||
matrix.adjoint();
|
assertThrows(InvalidGeometryException.class, matrix::adj);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.adj();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -1967,24 +1935,16 @@ public class TestDoubleMatrix{
|
|||||||
public void testAdjoint_size2x10(){
|
public void testAdjoint_size2x10(){
|
||||||
DoubleMatrix matrix = new DoubleMatrix(negativeGrid2x10);
|
DoubleMatrix matrix = new DoubleMatrix(negativeGrid2x10);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::adjoint);
|
||||||
matrix.adjoint();
|
assertThrows(InvalidGeometryException.class, matrix::adj);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.adj();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAdjoint_size10x2(){
|
public void testAdjoint_size10x2(){
|
||||||
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10x2);
|
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10x2);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::adjoint);
|
||||||
matrix.adjoint();
|
assertThrows(InvalidGeometryException.class, matrix::adj);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.adj();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! inverse()
|
//! inverse()
|
||||||
@@ -1992,9 +1952,7 @@ public class TestDoubleMatrix{
|
|||||||
public void testInverse_size0(){
|
public void testInverse_size0(){
|
||||||
DoubleMatrix matrix = new DoubleMatrix();
|
DoubleMatrix matrix = new DoubleMatrix();
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::inverse);
|
||||||
matrix.inverse();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -2017,27 +1975,21 @@ public class TestDoubleMatrix{
|
|||||||
public void testInverse_size10(){
|
public void testInverse_size10(){
|
||||||
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10);
|
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10);
|
||||||
|
|
||||||
assertThrows(InvalidScalarException.class, () -> {
|
assertThrows(InvalidScalarException.class, matrix::inverse);
|
||||||
matrix.inverse();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInverse_size2x10(){
|
public void testInverse_size2x10(){
|
||||||
DoubleMatrix matrix = new DoubleMatrix(negativeGrid2x10);
|
DoubleMatrix matrix = new DoubleMatrix(negativeGrid2x10);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::inverse);
|
||||||
matrix.inverse();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInverse_size10x2(){
|
public void testInverse_size10x2(){
|
||||||
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10x2);
|
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10x2);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::inverse);
|
||||||
matrix.inverse();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! equals()
|
//! equals()
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
//Matrix/src/test/java/com/mattrixwv/matrix/TestIntegerMatrix.java
|
|
||||||
//Mattrixwv
|
|
||||||
// Created: 02-01-22
|
|
||||||
//Modified: 08-10-24
|
|
||||||
package com.mattrixwv.matrix;
|
package com.mattrixwv.matrix;
|
||||||
|
|
||||||
|
|
||||||
@@ -1773,12 +1769,8 @@ public class TestIntegerMatrix{
|
|||||||
public void testDeterminant_size0(){
|
public void testDeterminant_size0(){
|
||||||
IntegerMatrix matrix = new IntegerMatrix();
|
IntegerMatrix matrix = new IntegerMatrix();
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::determinant);
|
||||||
matrix.determinant();
|
assertThrows(InvalidGeometryException.class, matrix::det);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.det();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -1817,24 +1809,16 @@ public class TestIntegerMatrix{
|
|||||||
public void testDeterminant_size2x10(){
|
public void testDeterminant_size2x10(){
|
||||||
IntegerMatrix matrix = new IntegerMatrix(negativeGrid2x10);
|
IntegerMatrix matrix = new IntegerMatrix(negativeGrid2x10);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::determinant);
|
||||||
matrix.determinant();
|
assertThrows(InvalidGeometryException.class, matrix::det);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.det();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDeterminant_size10x2(){
|
public void testDeterminant_size10x2(){
|
||||||
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10x2);
|
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10x2);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::determinant);
|
||||||
matrix.determinant();
|
assertThrows(InvalidGeometryException.class, matrix::det);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.det();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! cofactor() / cof()
|
//! cofactor() / cof()
|
||||||
@@ -1842,12 +1826,8 @@ public class TestIntegerMatrix{
|
|||||||
public void testCofactor_size0(){
|
public void testCofactor_size0(){
|
||||||
IntegerMatrix matrix = new IntegerMatrix();
|
IntegerMatrix matrix = new IntegerMatrix();
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::cofactor);
|
||||||
matrix.cofactor();
|
assertThrows(InvalidGeometryException.class, matrix::cof);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.cof();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -1892,24 +1872,16 @@ public class TestIntegerMatrix{
|
|||||||
public void testCofactor_size2x10(){
|
public void testCofactor_size2x10(){
|
||||||
IntegerMatrix matrix = new IntegerMatrix(negativeGrid2x10);
|
IntegerMatrix matrix = new IntegerMatrix(negativeGrid2x10);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::cofactor);
|
||||||
matrix.cofactor();
|
assertThrows(InvalidGeometryException.class, matrix::cof);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.cof();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCofactor_size10x2(){
|
public void testCofactor_size10x2(){
|
||||||
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10x2);
|
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10x2);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::cofactor);
|
||||||
matrix.cofactor();
|
assertThrows(InvalidGeometryException.class, matrix::cof);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.cof();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! adjoint() / adj()
|
//! adjoint() / adj()
|
||||||
@@ -1917,12 +1889,8 @@ public class TestIntegerMatrix{
|
|||||||
public void testAdjoint_size0(){
|
public void testAdjoint_size0(){
|
||||||
IntegerMatrix matrix = new IntegerMatrix();
|
IntegerMatrix matrix = new IntegerMatrix();
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::adjoint);
|
||||||
matrix.adjoint();
|
assertThrows(InvalidGeometryException.class, matrix::adj);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.adj();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -1967,24 +1935,16 @@ public class TestIntegerMatrix{
|
|||||||
public void testAdjoint_size2x10(){
|
public void testAdjoint_size2x10(){
|
||||||
IntegerMatrix matrix = new IntegerMatrix(negativeGrid2x10);
|
IntegerMatrix matrix = new IntegerMatrix(negativeGrid2x10);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::adjoint);
|
||||||
matrix.adjoint();
|
assertThrows(InvalidGeometryException.class, matrix::adj);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.adj();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAdjoint_size10x2(){
|
public void testAdjoint_size10x2(){
|
||||||
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10x2);
|
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10x2);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::adjoint);
|
||||||
matrix.adjoint();
|
assertThrows(InvalidGeometryException.class, matrix::adj);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.adj();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! inverse()
|
//! inverse()
|
||||||
@@ -1992,9 +1952,7 @@ public class TestIntegerMatrix{
|
|||||||
public void testInverse_size0(){
|
public void testInverse_size0(){
|
||||||
IntegerMatrix matrix = new IntegerMatrix();
|
IntegerMatrix matrix = new IntegerMatrix();
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::inverse);
|
||||||
matrix.inverse();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -2017,27 +1975,21 @@ public class TestIntegerMatrix{
|
|||||||
public void testInverse_size10(){
|
public void testInverse_size10(){
|
||||||
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10);
|
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10);
|
||||||
|
|
||||||
assertThrows(InvalidScalarException.class, () -> {
|
assertThrows(InvalidScalarException.class, matrix::inverse);
|
||||||
matrix.inverse();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInverse_size2x10(){
|
public void testInverse_size2x10(){
|
||||||
IntegerMatrix matrix = new IntegerMatrix(negativeGrid2x10);
|
IntegerMatrix matrix = new IntegerMatrix(negativeGrid2x10);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::inverse);
|
||||||
matrix.inverse();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInverse_size10x2(){
|
public void testInverse_size10x2(){
|
||||||
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10x2);
|
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10x2);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::inverse);
|
||||||
matrix.inverse();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! equals()
|
//! equals()
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
//Matrix/src/test/java/com/mattrixwv/matrix/TestLongMatrix.java
|
|
||||||
//Mattrixwv
|
|
||||||
// Created: 02-10-22
|
|
||||||
//Modified: 08-10-24
|
|
||||||
package com.mattrixwv.matrix;
|
package com.mattrixwv.matrix;
|
||||||
|
|
||||||
|
|
||||||
@@ -1774,12 +1770,8 @@ public class TestLongMatrix{
|
|||||||
public void testDeterminant_size0(){
|
public void testDeterminant_size0(){
|
||||||
LongMatrix matrix = new LongMatrix();
|
LongMatrix matrix = new LongMatrix();
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::determinant);
|
||||||
matrix.determinant();
|
assertThrows(InvalidGeometryException.class, matrix::det);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.det();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -1818,24 +1810,16 @@ public class TestLongMatrix{
|
|||||||
public void testDeterminant_size2x10(){
|
public void testDeterminant_size2x10(){
|
||||||
LongMatrix matrix = new LongMatrix(negativeGrid2x10);
|
LongMatrix matrix = new LongMatrix(negativeGrid2x10);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::determinant);
|
||||||
matrix.determinant();
|
assertThrows(InvalidGeometryException.class, matrix::det);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.det();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDeterminant_size10x2(){
|
public void testDeterminant_size10x2(){
|
||||||
LongMatrix matrix = new LongMatrix(negativeGrid10x2);
|
LongMatrix matrix = new LongMatrix(negativeGrid10x2);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::determinant);
|
||||||
matrix.determinant();
|
assertThrows(InvalidGeometryException.class, matrix::det);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.det();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! cofactor() / cof()
|
//! cofactor() / cof()
|
||||||
@@ -1843,12 +1827,8 @@ public class TestLongMatrix{
|
|||||||
public void testCofactor_size0(){
|
public void testCofactor_size0(){
|
||||||
LongMatrix matrix = new LongMatrix();
|
LongMatrix matrix = new LongMatrix();
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::cofactor);
|
||||||
matrix.cofactor();
|
assertThrows(InvalidGeometryException.class, matrix::cof);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.cof();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -1893,24 +1873,16 @@ public class TestLongMatrix{
|
|||||||
public void testCofactor_size2x10(){
|
public void testCofactor_size2x10(){
|
||||||
LongMatrix matrix = new LongMatrix(negativeGrid2x10);
|
LongMatrix matrix = new LongMatrix(negativeGrid2x10);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::cofactor);
|
||||||
matrix.cofactor();
|
assertThrows(InvalidGeometryException.class, matrix::cof);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.cof();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCofactor_size10x2(){
|
public void testCofactor_size10x2(){
|
||||||
LongMatrix matrix = new LongMatrix(negativeGrid10x2);
|
LongMatrix matrix = new LongMatrix(negativeGrid10x2);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::cofactor);
|
||||||
matrix.cofactor();
|
assertThrows(InvalidGeometryException.class, matrix::cof);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.cof();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! adjoint() / adj()
|
//! adjoint() / adj()
|
||||||
@@ -1918,12 +1890,8 @@ public class TestLongMatrix{
|
|||||||
public void testAdjoint_size0(){
|
public void testAdjoint_size0(){
|
||||||
LongMatrix matrix = new LongMatrix();
|
LongMatrix matrix = new LongMatrix();
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::adjoint);
|
||||||
matrix.adjoint();
|
assertThrows(InvalidGeometryException.class, matrix::adj);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.adj();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -1968,24 +1936,16 @@ public class TestLongMatrix{
|
|||||||
public void testAdjoint_size2x10(){
|
public void testAdjoint_size2x10(){
|
||||||
LongMatrix matrix = new LongMatrix(negativeGrid2x10);
|
LongMatrix matrix = new LongMatrix(negativeGrid2x10);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::adjoint);
|
||||||
matrix.adjoint();
|
assertThrows(InvalidGeometryException.class, matrix::adj);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.adj();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAdjoint_size10x2(){
|
public void testAdjoint_size10x2(){
|
||||||
LongMatrix matrix = new LongMatrix(negativeGrid10x2);
|
LongMatrix matrix = new LongMatrix(negativeGrid10x2);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::adjoint);
|
||||||
matrix.adjoint();
|
assertThrows(InvalidGeometryException.class, matrix::adj);
|
||||||
});
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
|
||||||
matrix.adj();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! inverse()
|
//! inverse()
|
||||||
@@ -1993,9 +1953,7 @@ public class TestLongMatrix{
|
|||||||
public void testInverse_size0(){
|
public void testInverse_size0(){
|
||||||
LongMatrix matrix = new LongMatrix();
|
LongMatrix matrix = new LongMatrix();
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::inverse);
|
||||||
matrix.inverse();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -2018,27 +1976,21 @@ public class TestLongMatrix{
|
|||||||
public void testInverse_size10(){
|
public void testInverse_size10(){
|
||||||
LongMatrix matrix = new LongMatrix(negativeGrid10);
|
LongMatrix matrix = new LongMatrix(negativeGrid10);
|
||||||
|
|
||||||
assertThrows(InvalidScalarException.class, () -> {
|
assertThrows(InvalidScalarException.class, matrix::inverse);
|
||||||
matrix.inverse();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInverse_size2x10(){
|
public void testInverse_size2x10(){
|
||||||
LongMatrix matrix = new LongMatrix(negativeGrid2x10);
|
LongMatrix matrix = new LongMatrix(negativeGrid2x10);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::inverse);
|
||||||
matrix.inverse();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInverse_size10x2(){
|
public void testInverse_size10x2(){
|
||||||
LongMatrix matrix = new LongMatrix(negativeGrid10x2);
|
LongMatrix matrix = new LongMatrix(negativeGrid10x2);
|
||||||
|
|
||||||
assertThrows(InvalidGeometryException.class, () -> {
|
assertThrows(InvalidGeometryException.class, matrix::inverse);
|
||||||
matrix.inverse();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! equals()
|
//! equals()
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,3 @@
|
|||||||
//Matrix/src/test/java/com/mattrixwv/matrix/exceptions/TestInvalidCoordinatesException.java
|
|
||||||
//Mattrixwv
|
|
||||||
// Created: 04-13-23
|
|
||||||
//Modified: 08-11-24
|
|
||||||
package com.mattrixwv.matrix.exceptions;
|
package com.mattrixwv.matrix.exceptions;
|
||||||
|
|
||||||
|
|
||||||
@@ -11,8 +7,8 @@ import org.junit.jupiter.api.Test;
|
|||||||
|
|
||||||
|
|
||||||
public class TestInvalidCoordinatesException{
|
public class TestInvalidCoordinatesException{
|
||||||
private static final String message = "message";
|
private static final String MESSAGE = "message";
|
||||||
private static final Throwable cause = new Exception();
|
private static final Throwable CAUSE = new Exception();
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -23,22 +19,22 @@ public class TestInvalidCoordinatesException{
|
|||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_message(){
|
public void testConstructor_message(){
|
||||||
InvalidCoordinatesException exception = new InvalidCoordinatesException(message);
|
InvalidCoordinatesException exception = new InvalidCoordinatesException(MESSAGE);
|
||||||
assertEquals(message, exception.getMessage());
|
assertEquals(MESSAGE, exception.getMessage());
|
||||||
assertNull(exception.getCause());
|
assertNull(exception.getCause());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_cause(){
|
public void testConstructor_cause(){
|
||||||
InvalidCoordinatesException exception = new InvalidCoordinatesException(cause);
|
InvalidCoordinatesException exception = new InvalidCoordinatesException(CAUSE);
|
||||||
assertEquals(cause.toString(), exception.getMessage());
|
assertEquals(CAUSE.toString(), exception.getMessage());
|
||||||
assertEquals(cause, exception.getCause());
|
assertEquals(CAUSE, exception.getCause());
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_messageCause(){
|
public void testConstructor_messageCause(){
|
||||||
InvalidCoordinatesException exception = new InvalidCoordinatesException(message, cause);
|
InvalidCoordinatesException exception = new InvalidCoordinatesException(MESSAGE, CAUSE);
|
||||||
assertEquals(message, exception.getMessage());
|
assertEquals(MESSAGE, exception.getMessage());
|
||||||
assertEquals(cause, exception.getCause());
|
assertEquals(CAUSE, exception.getCause());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
//Matrix/src/test/java/com/mattrixwv/matrix/exceptions/TestInvalidGeometryException.java
|
|
||||||
//Mattrixwv
|
|
||||||
// Created: 04-13-23
|
|
||||||
//Modified: 08-11-24
|
|
||||||
package com.mattrixwv.matrix.exceptions;
|
package com.mattrixwv.matrix.exceptions;
|
||||||
|
|
||||||
|
|
||||||
@@ -11,8 +7,8 @@ import org.junit.jupiter.api.Test;
|
|||||||
|
|
||||||
|
|
||||||
public class TestInvalidGeometryException{
|
public class TestInvalidGeometryException{
|
||||||
private static final String message = "message";
|
private static final String MESSAGE = "message";
|
||||||
private static final Throwable cause = new Exception();
|
private static final Throwable CAUSE = new Exception();
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -24,22 +20,22 @@ public class TestInvalidGeometryException{
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_message(){
|
public void testConstructor_message(){
|
||||||
InvalidGeometryException exception = new InvalidGeometryException(message);
|
InvalidGeometryException exception = new InvalidGeometryException(MESSAGE);
|
||||||
assertEquals(message, exception.getMessage());
|
assertEquals(MESSAGE, exception.getMessage());
|
||||||
assertNull(exception.getCause());
|
assertNull(exception.getCause());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_cause(){
|
public void testConstructor_cause(){
|
||||||
InvalidGeometryException exception = new InvalidGeometryException(cause);
|
InvalidGeometryException exception = new InvalidGeometryException(CAUSE);
|
||||||
assertEquals(cause.toString(), exception.getMessage());
|
assertEquals(CAUSE.toString(), exception.getMessage());
|
||||||
assertEquals(cause, exception.getCause());
|
assertEquals(CAUSE, exception.getCause());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_messageCause(){
|
public void testConstructor_messageCause(){
|
||||||
InvalidGeometryException exception = new InvalidGeometryException(message, cause);
|
InvalidGeometryException exception = new InvalidGeometryException(MESSAGE, CAUSE);
|
||||||
assertEquals(message, exception.getMessage());
|
assertEquals(MESSAGE, exception.getMessage());
|
||||||
assertEquals(cause, exception.getCause());
|
assertEquals(CAUSE, exception.getCause());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
//Matrix/src/test/java/com/mattrixwv/matrix/exceptions/TestInvalidRowSizeException.java
|
|
||||||
//Mattrixwv
|
|
||||||
// Created: 04-13-23
|
|
||||||
//Modified: 08-11-24
|
|
||||||
package com.mattrixwv.matrix.exceptions;
|
package com.mattrixwv.matrix.exceptions;
|
||||||
|
|
||||||
|
|
||||||
@@ -11,8 +7,8 @@ import org.junit.jupiter.api.Test;
|
|||||||
|
|
||||||
|
|
||||||
public class TestInvalidRowSizeException{
|
public class TestInvalidRowSizeException{
|
||||||
private static final String message = "message";
|
private static final String MESSAGE = "message";
|
||||||
private static final Throwable cause = new Exception();
|
private static final Throwable CAUSE = new Exception();
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -24,22 +20,22 @@ public class TestInvalidRowSizeException{
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_message(){
|
public void testConstructor_message(){
|
||||||
InvalidRowSizeException exception = new InvalidRowSizeException(message);
|
InvalidRowSizeException exception = new InvalidRowSizeException(MESSAGE);
|
||||||
assertEquals(message, exception.getMessage());
|
assertEquals(MESSAGE, exception.getMessage());
|
||||||
assertNull(exception.getCause());
|
assertNull(exception.getCause());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_cause(){
|
public void testConstructor_cause(){
|
||||||
InvalidRowSizeException exception = new InvalidRowSizeException(cause);
|
InvalidRowSizeException exception = new InvalidRowSizeException(CAUSE);
|
||||||
assertEquals(cause.toString(), exception.getMessage());
|
assertEquals(CAUSE.toString(), exception.getMessage());
|
||||||
assertEquals(cause, exception.getCause());
|
assertEquals(CAUSE, exception.getCause());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_messageCause(){
|
public void testConstructor_messageCause(){
|
||||||
InvalidRowSizeException exception = new InvalidRowSizeException(message, cause);
|
InvalidRowSizeException exception = new InvalidRowSizeException(MESSAGE, CAUSE);
|
||||||
assertEquals(message, exception.getMessage());
|
assertEquals(MESSAGE, exception.getMessage());
|
||||||
assertEquals(cause, exception.getCause());
|
assertEquals(CAUSE, exception.getCause());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
//Matrix/src/test/java/com/mattrixwv/matrix/exceptions/TestInvalidScalarException.java
|
|
||||||
//Mattrixwv
|
|
||||||
// Created: 04-13-23
|
|
||||||
//Modified: 08-11-24
|
|
||||||
package com.mattrixwv.matrix.exceptions;
|
package com.mattrixwv.matrix.exceptions;
|
||||||
|
|
||||||
|
|
||||||
@@ -11,8 +7,8 @@ import org.junit.jupiter.api.Test;
|
|||||||
|
|
||||||
|
|
||||||
public class TestInvalidScalarException{
|
public class TestInvalidScalarException{
|
||||||
private static final String message = "message";
|
private static final String MESSAGE = "message";
|
||||||
private static final Throwable cause = new Exception();
|
private static final Throwable CAUSE = new Exception();
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -24,22 +20,22 @@ public class TestInvalidScalarException{
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_message(){
|
public void testConstructor_message(){
|
||||||
InvalidScalarException exception = new InvalidScalarException(message);
|
InvalidScalarException exception = new InvalidScalarException(MESSAGE);
|
||||||
assertEquals(message, exception.getMessage());
|
assertEquals(MESSAGE, exception.getMessage());
|
||||||
assertNull(exception.getCause());
|
assertNull(exception.getCause());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_cause(){
|
public void testConstructor_cause(){
|
||||||
InvalidScalarException exception = new InvalidScalarException(cause);
|
InvalidScalarException exception = new InvalidScalarException(CAUSE);
|
||||||
assertEquals(cause.toString(), exception.getMessage());
|
assertEquals(CAUSE.toString(), exception.getMessage());
|
||||||
assertEquals(cause, exception.getCause());
|
assertEquals(CAUSE, exception.getCause());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_messageCause(){
|
public void testConstructor_messageCause(){
|
||||||
InvalidScalarException exception = new InvalidScalarException(message, cause);
|
InvalidScalarException exception = new InvalidScalarException(MESSAGE, CAUSE);
|
||||||
assertEquals(message, exception.getMessage());
|
assertEquals(MESSAGE, exception.getMessage());
|
||||||
assertEquals(cause, exception.getCause());
|
assertEquals(CAUSE, exception.getCause());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
//Matrix/src/test/java/com/mattrixwv/matrix/exceptions/TestNullMatrixException.java
|
|
||||||
//Mattrixwv
|
|
||||||
// Created: 04-13-23
|
|
||||||
//Modified: 08-11-24
|
|
||||||
package com.mattrixwv.matrix.exceptions;
|
package com.mattrixwv.matrix.exceptions;
|
||||||
|
|
||||||
|
|
||||||
@@ -11,8 +7,8 @@ import org.junit.jupiter.api.Test;
|
|||||||
|
|
||||||
|
|
||||||
public class TestNullMatrixException{
|
public class TestNullMatrixException{
|
||||||
private static final String message = "message";
|
private static final String MESSAGE = "message";
|
||||||
private static final Throwable cause = new Exception();
|
private static final Throwable CAUSE = new Exception();
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -24,21 +20,21 @@ public class TestNullMatrixException{
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_message(){
|
public void testConstructor_message(){
|
||||||
NullMatrixException exception = new NullMatrixException(message);
|
NullMatrixException exception = new NullMatrixException(MESSAGE);
|
||||||
assertEquals(message, exception.getMessage());
|
assertEquals(MESSAGE, exception.getMessage());
|
||||||
assertNull(exception.getCause());
|
assertNull(exception.getCause());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_cause(){
|
public void testConstructor_cause(){
|
||||||
NullMatrixException exception = new NullMatrixException(cause);
|
NullMatrixException exception = new NullMatrixException(CAUSE);
|
||||||
assertEquals(cause.toString(), exception.getMessage());
|
assertEquals(CAUSE.toString(), exception.getMessage());
|
||||||
assertEquals(cause, exception.getCause());
|
assertEquals(CAUSE, exception.getCause());
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void testConstructor_messageCause(){
|
public void testConstructor_messageCause(){
|
||||||
NullMatrixException exception = new NullMatrixException(message, cause);
|
NullMatrixException exception = new NullMatrixException(MESSAGE, CAUSE);
|
||||||
assertEquals(message, exception.getMessage());
|
assertEquals(MESSAGE, exception.getMessage());
|
||||||
assertEquals(cause, exception.getCause());
|
assertEquals(CAUSE, exception.getCause());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user