4 Commits

Author SHA1 Message Date
7f2d72ed8e Update version numbers 2026-01-26 18:06:05 -05:00
68d4fdb46d Add README 2026-01-26 17:59:58 -05:00
62eefe9615 Fix more sonarqube warnings 2026-01-26 16:32:16 -05:00
e1e121b879 Fix sonarqube warnings 2026-01-26 16:21:57 -05:00
12 changed files with 636 additions and 1069 deletions

7
README.md Normal file
View File

@@ -0,0 +1,7 @@
# Matrix
[![Quality Gate Status](https://sonarqube.mattrixwv.com/api/project_badges/measure?project=matrix&metric=alert_status&token=sqb_b6f7219a7b625b1ab2964e9dfa90e58a7c4c4e57)](https://sonarqube.mattrixwv.com/dashboard?id=matrix)
This is my matrix library, created as curiosity and to fit into my [Cipher Stream](https://git.mattrixwv.com/BaseLibraries/CipherStream) project.
TODO: Fill this is better information about library usage.

View File

@@ -22,12 +22,12 @@
<scm>
<connection>scm:git:git://bitbucket.org/Mattrixwv/Matrix.git</connection>
<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>
<groupId>com.mattrixwv</groupId>
<artifactId>matrix</artifactId>
<version>1.3.1</version>
<version>1.3.2</version>
<name>Matrix</name>
<description>A library for performing Matrix operations</description>

File diff suppressed because it is too large Load Diff

View File

@@ -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;
@@ -1773,12 +1769,8 @@ public class TestDoubleMatrix{
public void testDeterminant_size0(){
DoubleMatrix matrix = new DoubleMatrix();
assertThrows(InvalidGeometryException.class, () -> {
matrix.determinant();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.det();
});
assertThrows(InvalidGeometryException.class, matrix::determinant);
assertThrows(InvalidGeometryException.class, matrix::det);
}
@Test
@@ -1817,24 +1809,16 @@ public class TestDoubleMatrix{
public void testDeterminant_size2x10(){
DoubleMatrix matrix = new DoubleMatrix(negativeGrid2x10);
assertThrows(InvalidGeometryException.class, () -> {
matrix.determinant();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.det();
});
assertThrows(InvalidGeometryException.class, matrix::determinant);
assertThrows(InvalidGeometryException.class, matrix::det);
}
@Test
public void testDeterminant_size10x2(){
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10x2);
assertThrows(InvalidGeometryException.class, () -> {
matrix.determinant();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.det();
});
assertThrows(InvalidGeometryException.class, matrix::determinant);
assertThrows(InvalidGeometryException.class, matrix::det);
}
//! cofactor() / cof()
@@ -1842,12 +1826,8 @@ public class TestDoubleMatrix{
public void testCofactor_size0(){
DoubleMatrix matrix = new DoubleMatrix();
assertThrows(InvalidGeometryException.class, () -> {
matrix.cofactor();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.cof();
});
assertThrows(InvalidGeometryException.class, matrix::cofactor);
assertThrows(InvalidGeometryException.class, matrix::cof);
}
@Test
@@ -1892,24 +1872,16 @@ public class TestDoubleMatrix{
public void testCofactor_size2x10(){
DoubleMatrix matrix = new DoubleMatrix(negativeGrid2x10);
assertThrows(InvalidGeometryException.class, () -> {
matrix.cofactor();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.cof();
});
assertThrows(InvalidGeometryException.class, matrix::cofactor);
assertThrows(InvalidGeometryException.class, matrix::cof);
}
@Test
public void testCofactor_size10x2(){
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10x2);
assertThrows(InvalidGeometryException.class, () -> {
matrix.cofactor();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.cof();
});
assertThrows(InvalidGeometryException.class, matrix::cofactor);
assertThrows(InvalidGeometryException.class, matrix::cof);
}
//! adjoint() / adj()
@@ -1917,12 +1889,8 @@ public class TestDoubleMatrix{
public void testAdjoint_size0(){
DoubleMatrix matrix = new DoubleMatrix();
assertThrows(InvalidGeometryException.class, () -> {
matrix.adjoint();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.adj();
});
assertThrows(InvalidGeometryException.class, matrix::adjoint);
assertThrows(InvalidGeometryException.class, matrix::adj);
}
@Test
@@ -1967,24 +1935,16 @@ public class TestDoubleMatrix{
public void testAdjoint_size2x10(){
DoubleMatrix matrix = new DoubleMatrix(negativeGrid2x10);
assertThrows(InvalidGeometryException.class, () -> {
matrix.adjoint();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.adj();
});
assertThrows(InvalidGeometryException.class, matrix::adjoint);
assertThrows(InvalidGeometryException.class, matrix::adj);
}
@Test
public void testAdjoint_size10x2(){
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10x2);
assertThrows(InvalidGeometryException.class, () -> {
matrix.adjoint();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.adj();
});
assertThrows(InvalidGeometryException.class, matrix::adjoint);
assertThrows(InvalidGeometryException.class, matrix::adj);
}
//! inverse()
@@ -1992,9 +1952,7 @@ public class TestDoubleMatrix{
public void testInverse_size0(){
DoubleMatrix matrix = new DoubleMatrix();
assertThrows(InvalidGeometryException.class, () -> {
matrix.inverse();
});
assertThrows(InvalidGeometryException.class, matrix::inverse);
}
@Test
@@ -2017,27 +1975,21 @@ public class TestDoubleMatrix{
public void testInverse_size10(){
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10);
assertThrows(InvalidScalarException.class, () -> {
matrix.inverse();
});
assertThrows(InvalidScalarException.class, matrix::inverse);
}
@Test
public void testInverse_size2x10(){
DoubleMatrix matrix = new DoubleMatrix(negativeGrid2x10);
assertThrows(InvalidGeometryException.class, () -> {
matrix.inverse();
});
assertThrows(InvalidGeometryException.class, matrix::inverse);
}
@Test
public void testInverse_size10x2(){
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10x2);
assertThrows(InvalidGeometryException.class, () -> {
matrix.inverse();
});
assertThrows(InvalidGeometryException.class, matrix::inverse);
}
//! equals()
@@ -2181,16 +2133,17 @@ public class TestDoubleMatrix{
DoubleMatrix matrix = new DoubleMatrix(negativeGrid10);
assertEquals(
"[-1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0, -9.0, -10.0]\n" +
"[-11.0, -12.0, -13.0, -14.0, -15.0, -16.0, -17.0, -18.0, -19.0, -20.0]\n" +
"[-21.0, -22.0, -23.0, -24.0, -25.0, -26.0, -27.0, -28.0, -29.0, -30.0]\n" +
"[-31.0, -32.0, -33.0, -34.0, -35.0, -36.0, -37.0, -38.0, -39.0, -40.0]\n" +
"[-41.0, -42.0, -43.0, -44.0, -45.0, -46.0, -47.0, -48.0, -49.0, -50.0]\n" +
"[-51.0, -52.0, -53.0, -54.0, -55.0, -56.0, -57.0, -58.0, -59.0, -60.0]\n" +
"[-61.0, -62.0, -63.0, -64.0, -65.0, -66.0, -67.0, -68.0, -69.0, -70.0]\n" +
"[-71.0, -72.0, -73.0, -74.0, -75.0, -76.0, -77.0, -78.0, -79.0, -80.0]\n" +
"[-81.0, -82.0, -83.0, -84.0, -85.0, -86.0, -87.0, -88.0, -89.0, -90.0]\n" +
"[-91.0, -92.0, -93.0, -94.0, -95.0, -96.0, -97.0, -98.0, -99.0, -100.0]",
"""
[-1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0, -9.0, -10.0]
[-11.0, -12.0, -13.0, -14.0, -15.0, -16.0, -17.0, -18.0, -19.0, -20.0]
[-21.0, -22.0, -23.0, -24.0, -25.0, -26.0, -27.0, -28.0, -29.0, -30.0]
[-31.0, -32.0, -33.0, -34.0, -35.0, -36.0, -37.0, -38.0, -39.0, -40.0]
[-41.0, -42.0, -43.0, -44.0, -45.0, -46.0, -47.0, -48.0, -49.0, -50.0]
[-51.0, -52.0, -53.0, -54.0, -55.0, -56.0, -57.0, -58.0, -59.0, -60.0]
[-61.0, -62.0, -63.0, -64.0, -65.0, -66.0, -67.0, -68.0, -69.0, -70.0]
[-71.0, -72.0, -73.0, -74.0, -75.0, -76.0, -77.0, -78.0, -79.0, -80.0]
[-81.0, -82.0, -83.0, -84.0, -85.0, -86.0, -87.0, -88.0, -89.0, -90.0]
[-91.0, -92.0, -93.0, -94.0, -95.0, -96.0, -97.0, -98.0, -99.0, -100.0]""",
matrix.toString());
}

View File

@@ -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;
@@ -1773,12 +1769,8 @@ public class TestIntegerMatrix{
public void testDeterminant_size0(){
IntegerMatrix matrix = new IntegerMatrix();
assertThrows(InvalidGeometryException.class, () -> {
matrix.determinant();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.det();
});
assertThrows(InvalidGeometryException.class, matrix::determinant);
assertThrows(InvalidGeometryException.class, matrix::det);
}
@Test
@@ -1817,24 +1809,16 @@ public class TestIntegerMatrix{
public void testDeterminant_size2x10(){
IntegerMatrix matrix = new IntegerMatrix(negativeGrid2x10);
assertThrows(InvalidGeometryException.class, () -> {
matrix.determinant();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.det();
});
assertThrows(InvalidGeometryException.class, matrix::determinant);
assertThrows(InvalidGeometryException.class, matrix::det);
}
@Test
public void testDeterminant_size10x2(){
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10x2);
assertThrows(InvalidGeometryException.class, () -> {
matrix.determinant();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.det();
});
assertThrows(InvalidGeometryException.class, matrix::determinant);
assertThrows(InvalidGeometryException.class, matrix::det);
}
//! cofactor() / cof()
@@ -1842,12 +1826,8 @@ public class TestIntegerMatrix{
public void testCofactor_size0(){
IntegerMatrix matrix = new IntegerMatrix();
assertThrows(InvalidGeometryException.class, () -> {
matrix.cofactor();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.cof();
});
assertThrows(InvalidGeometryException.class, matrix::cofactor);
assertThrows(InvalidGeometryException.class, matrix::cof);
}
@Test
@@ -1892,24 +1872,16 @@ public class TestIntegerMatrix{
public void testCofactor_size2x10(){
IntegerMatrix matrix = new IntegerMatrix(negativeGrid2x10);
assertThrows(InvalidGeometryException.class, () -> {
matrix.cofactor();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.cof();
});
assertThrows(InvalidGeometryException.class, matrix::cofactor);
assertThrows(InvalidGeometryException.class, matrix::cof);
}
@Test
public void testCofactor_size10x2(){
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10x2);
assertThrows(InvalidGeometryException.class, () -> {
matrix.cofactor();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.cof();
});
assertThrows(InvalidGeometryException.class, matrix::cofactor);
assertThrows(InvalidGeometryException.class, matrix::cof);
}
//! adjoint() / adj()
@@ -1917,12 +1889,8 @@ public class TestIntegerMatrix{
public void testAdjoint_size0(){
IntegerMatrix matrix = new IntegerMatrix();
assertThrows(InvalidGeometryException.class, () -> {
matrix.adjoint();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.adj();
});
assertThrows(InvalidGeometryException.class, matrix::adjoint);
assertThrows(InvalidGeometryException.class, matrix::adj);
}
@Test
@@ -1967,24 +1935,16 @@ public class TestIntegerMatrix{
public void testAdjoint_size2x10(){
IntegerMatrix matrix = new IntegerMatrix(negativeGrid2x10);
assertThrows(InvalidGeometryException.class, () -> {
matrix.adjoint();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.adj();
});
assertThrows(InvalidGeometryException.class, matrix::adjoint);
assertThrows(InvalidGeometryException.class, matrix::adj);
}
@Test
public void testAdjoint_size10x2(){
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10x2);
assertThrows(InvalidGeometryException.class, () -> {
matrix.adjoint();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.adj();
});
assertThrows(InvalidGeometryException.class, matrix::adjoint);
assertThrows(InvalidGeometryException.class, matrix::adj);
}
//! inverse()
@@ -1992,9 +1952,7 @@ public class TestIntegerMatrix{
public void testInverse_size0(){
IntegerMatrix matrix = new IntegerMatrix();
assertThrows(InvalidGeometryException.class, () -> {
matrix.inverse();
});
assertThrows(InvalidGeometryException.class, matrix::inverse);
}
@Test
@@ -2017,27 +1975,21 @@ public class TestIntegerMatrix{
public void testInverse_size10(){
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10);
assertThrows(InvalidScalarException.class, () -> {
matrix.inverse();
});
assertThrows(InvalidScalarException.class, matrix::inverse);
}
@Test
public void testInverse_size2x10(){
IntegerMatrix matrix = new IntegerMatrix(negativeGrid2x10);
assertThrows(InvalidGeometryException.class, () -> {
matrix.inverse();
});
assertThrows(InvalidGeometryException.class, matrix::inverse);
}
@Test
public void testInverse_size10x2(){
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10x2);
assertThrows(InvalidGeometryException.class, () -> {
matrix.inverse();
});
assertThrows(InvalidGeometryException.class, matrix::inverse);
}
//! equals()
@@ -2182,16 +2134,17 @@ public class TestIntegerMatrix{
IntegerMatrix matrix = new IntegerMatrix(negativeGrid10);
assertEquals(
"[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]\n" +
"[-11, -12, -13, -14, -15, -16, -17, -18, -19, -20]\n" +
"[-21, -22, -23, -24, -25, -26, -27, -28, -29, -30]\n" +
"[-31, -32, -33, -34, -35, -36, -37, -38, -39, -40]\n" +
"[-41, -42, -43, -44, -45, -46, -47, -48, -49, -50]\n" +
"[-51, -52, -53, -54, -55, -56, -57, -58, -59, -60]\n" +
"[-61, -62, -63, -64, -65, -66, -67, -68, -69, -70]\n" +
"[-71, -72, -73, -74, -75, -76, -77, -78, -79, -80]\n" +
"[-81, -82, -83, -84, -85, -86, -87, -88, -89, -90]\n" +
"[-91, -92, -93, -94, -95, -96, -97, -98, -99, -100]",
"""
[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]
[-11, -12, -13, -14, -15, -16, -17, -18, -19, -20]
[-21, -22, -23, -24, -25, -26, -27, -28, -29, -30]
[-31, -32, -33, -34, -35, -36, -37, -38, -39, -40]
[-41, -42, -43, -44, -45, -46, -47, -48, -49, -50]
[-51, -52, -53, -54, -55, -56, -57, -58, -59, -60]
[-61, -62, -63, -64, -65, -66, -67, -68, -69, -70]
[-71, -72, -73, -74, -75, -76, -77, -78, -79, -80]
[-81, -82, -83, -84, -85, -86, -87, -88, -89, -90]
[-91, -92, -93, -94, -95, -96, -97, -98, -99, -100]""",
matrix.toString());
}

View File

@@ -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;
@@ -1774,12 +1770,8 @@ public class TestLongMatrix{
public void testDeterminant_size0(){
LongMatrix matrix = new LongMatrix();
assertThrows(InvalidGeometryException.class, () -> {
matrix.determinant();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.det();
});
assertThrows(InvalidGeometryException.class, matrix::determinant);
assertThrows(InvalidGeometryException.class, matrix::det);
}
@Test
@@ -1818,24 +1810,16 @@ public class TestLongMatrix{
public void testDeterminant_size2x10(){
LongMatrix matrix = new LongMatrix(negativeGrid2x10);
assertThrows(InvalidGeometryException.class, () -> {
matrix.determinant();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.det();
});
assertThrows(InvalidGeometryException.class, matrix::determinant);
assertThrows(InvalidGeometryException.class, matrix::det);
}
@Test
public void testDeterminant_size10x2(){
LongMatrix matrix = new LongMatrix(negativeGrid10x2);
assertThrows(InvalidGeometryException.class, () -> {
matrix.determinant();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.det();
});
assertThrows(InvalidGeometryException.class, matrix::determinant);
assertThrows(InvalidGeometryException.class, matrix::det);
}
//! cofactor() / cof()
@@ -1843,12 +1827,8 @@ public class TestLongMatrix{
public void testCofactor_size0(){
LongMatrix matrix = new LongMatrix();
assertThrows(InvalidGeometryException.class, () -> {
matrix.cofactor();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.cof();
});
assertThrows(InvalidGeometryException.class, matrix::cofactor);
assertThrows(InvalidGeometryException.class, matrix::cof);
}
@Test
@@ -1893,24 +1873,16 @@ public class TestLongMatrix{
public void testCofactor_size2x10(){
LongMatrix matrix = new LongMatrix(negativeGrid2x10);
assertThrows(InvalidGeometryException.class, () -> {
matrix.cofactor();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.cof();
});
assertThrows(InvalidGeometryException.class, matrix::cofactor);
assertThrows(InvalidGeometryException.class, matrix::cof);
}
@Test
public void testCofactor_size10x2(){
LongMatrix matrix = new LongMatrix(negativeGrid10x2);
assertThrows(InvalidGeometryException.class, () -> {
matrix.cofactor();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.cof();
});
assertThrows(InvalidGeometryException.class, matrix::cofactor);
assertThrows(InvalidGeometryException.class, matrix::cof);
}
//! adjoint() / adj()
@@ -1918,12 +1890,8 @@ public class TestLongMatrix{
public void testAdjoint_size0(){
LongMatrix matrix = new LongMatrix();
assertThrows(InvalidGeometryException.class, () -> {
matrix.adjoint();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.adj();
});
assertThrows(InvalidGeometryException.class, matrix::adjoint);
assertThrows(InvalidGeometryException.class, matrix::adj);
}
@Test
@@ -1968,24 +1936,16 @@ public class TestLongMatrix{
public void testAdjoint_size2x10(){
LongMatrix matrix = new LongMatrix(negativeGrid2x10);
assertThrows(InvalidGeometryException.class, () -> {
matrix.adjoint();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.adj();
});
assertThrows(InvalidGeometryException.class, matrix::adjoint);
assertThrows(InvalidGeometryException.class, matrix::adj);
}
@Test
public void testAdjoint_size10x2(){
LongMatrix matrix = new LongMatrix(negativeGrid10x2);
assertThrows(InvalidGeometryException.class, () -> {
matrix.adjoint();
});
assertThrows(InvalidGeometryException.class, () -> {
matrix.adj();
});
assertThrows(InvalidGeometryException.class, matrix::adjoint);
assertThrows(InvalidGeometryException.class, matrix::adj);
}
//! inverse()
@@ -1993,9 +1953,7 @@ public class TestLongMatrix{
public void testInverse_size0(){
LongMatrix matrix = new LongMatrix();
assertThrows(InvalidGeometryException.class, () -> {
matrix.inverse();
});
assertThrows(InvalidGeometryException.class, matrix::inverse);
}
@Test
@@ -2018,27 +1976,21 @@ public class TestLongMatrix{
public void testInverse_size10(){
LongMatrix matrix = new LongMatrix(negativeGrid10);
assertThrows(InvalidScalarException.class, () -> {
matrix.inverse();
});
assertThrows(InvalidScalarException.class, matrix::inverse);
}
@Test
public void testInverse_size2x10(){
LongMatrix matrix = new LongMatrix(negativeGrid2x10);
assertThrows(InvalidGeometryException.class, () -> {
matrix.inverse();
});
assertThrows(InvalidGeometryException.class, matrix::inverse);
}
@Test
public void testInverse_size10x2(){
LongMatrix matrix = new LongMatrix(negativeGrid10x2);
assertThrows(InvalidGeometryException.class, () -> {
matrix.inverse();
});
assertThrows(InvalidGeometryException.class, matrix::inverse);
}
//! equals()
@@ -2182,16 +2134,17 @@ public class TestLongMatrix{
LongMatrix matrix = new LongMatrix(negativeGrid10);
assertEquals(
"[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]\n" +
"[-11, -12, -13, -14, -15, -16, -17, -18, -19, -20]\n" +
"[-21, -22, -23, -24, -25, -26, -27, -28, -29, -30]\n" +
"[-31, -32, -33, -34, -35, -36, -37, -38, -39, -40]\n" +
"[-41, -42, -43, -44, -45, -46, -47, -48, -49, -50]\n" +
"[-51, -52, -53, -54, -55, -56, -57, -58, -59, -60]\n" +
"[-61, -62, -63, -64, -65, -66, -67, -68, -69, -70]\n" +
"[-71, -72, -73, -74, -75, -76, -77, -78, -79, -80]\n" +
"[-81, -82, -83, -84, -85, -86, -87, -88, -89, -90]\n" +
"[-91, -92, -93, -94, -95, -96, -97, -98, -99, -100]",
"""
[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]
[-11, -12, -13, -14, -15, -16, -17, -18, -19, -20]
[-21, -22, -23, -24, -25, -26, -27, -28, -29, -30]
[-31, -32, -33, -34, -35, -36, -37, -38, -39, -40]
[-41, -42, -43, -44, -45, -46, -47, -48, -49, -50]
[-51, -52, -53, -54, -55, -56, -57, -58, -59, -60]
[-61, -62, -63, -64, -65, -66, -67, -68, -69, -70]
[-71, -72, -73, -74, -75, -76, -77, -78, -79, -80]
[-81, -82, -83, -84, -85, -86, -87, -88, -89, -90]
[-91, -92, -93, -94, -95, -96, -97, -98, -99, -100]""",
matrix.toString());
}

File diff suppressed because it is too large Load Diff

View File

@@ -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;
@@ -11,8 +7,8 @@ import org.junit.jupiter.api.Test;
public class TestInvalidCoordinatesException{
private static final String message = "message";
private static final Throwable cause = new Exception();
private static final String MESSAGE = "message";
private static final Throwable CAUSE = new Exception();
@Test
@@ -23,22 +19,22 @@ public class TestInvalidCoordinatesException{
}
@Test
public void testConstructor_message(){
InvalidCoordinatesException exception = new InvalidCoordinatesException(message);
assertEquals(message, exception.getMessage());
InvalidCoordinatesException exception = new InvalidCoordinatesException(MESSAGE);
assertEquals(MESSAGE, exception.getMessage());
assertNull(exception.getCause());
}
@Test
public void testConstructor_cause(){
InvalidCoordinatesException exception = new InvalidCoordinatesException(cause);
assertEquals(cause.toString(), exception.getMessage());
assertEquals(cause, exception.getCause());
InvalidCoordinatesException exception = new InvalidCoordinatesException(CAUSE);
assertEquals(CAUSE.toString(), exception.getMessage());
assertEquals(CAUSE, exception.getCause());
}
@Test
public void testConstructor_messageCause(){
InvalidCoordinatesException exception = new InvalidCoordinatesException(message, cause);
assertEquals(message, exception.getMessage());
assertEquals(cause, exception.getCause());
InvalidCoordinatesException exception = new InvalidCoordinatesException(MESSAGE, CAUSE);
assertEquals(MESSAGE, exception.getMessage());
assertEquals(CAUSE, exception.getCause());
}
@Test

View File

@@ -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;
@@ -11,8 +7,8 @@ import org.junit.jupiter.api.Test;
public class TestInvalidGeometryException{
private static final String message = "message";
private static final Throwable cause = new Exception();
private static final String MESSAGE = "message";
private static final Throwable CAUSE = new Exception();
@Test
@@ -24,22 +20,22 @@ public class TestInvalidGeometryException{
@Test
public void testConstructor_message(){
InvalidGeometryException exception = new InvalidGeometryException(message);
assertEquals(message, exception.getMessage());
InvalidGeometryException exception = new InvalidGeometryException(MESSAGE);
assertEquals(MESSAGE, exception.getMessage());
assertNull(exception.getCause());
}
@Test
public void testConstructor_cause(){
InvalidGeometryException exception = new InvalidGeometryException(cause);
assertEquals(cause.toString(), exception.getMessage());
assertEquals(cause, exception.getCause());
InvalidGeometryException exception = new InvalidGeometryException(CAUSE);
assertEquals(CAUSE.toString(), exception.getMessage());
assertEquals(CAUSE, exception.getCause());
}
@Test
public void testConstructor_messageCause(){
InvalidGeometryException exception = new InvalidGeometryException(message, cause);
assertEquals(message, exception.getMessage());
assertEquals(cause, exception.getCause());
InvalidGeometryException exception = new InvalidGeometryException(MESSAGE, CAUSE);
assertEquals(MESSAGE, exception.getMessage());
assertEquals(CAUSE, exception.getCause());
}
}

View File

@@ -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;
@@ -11,8 +7,8 @@ import org.junit.jupiter.api.Test;
public class TestInvalidRowSizeException{
private static final String message = "message";
private static final Throwable cause = new Exception();
private static final String MESSAGE = "message";
private static final Throwable CAUSE = new Exception();
@Test
@@ -24,22 +20,22 @@ public class TestInvalidRowSizeException{
@Test
public void testConstructor_message(){
InvalidRowSizeException exception = new InvalidRowSizeException(message);
assertEquals(message, exception.getMessage());
InvalidRowSizeException exception = new InvalidRowSizeException(MESSAGE);
assertEquals(MESSAGE, exception.getMessage());
assertNull(exception.getCause());
}
@Test
public void testConstructor_cause(){
InvalidRowSizeException exception = new InvalidRowSizeException(cause);
assertEquals(cause.toString(), exception.getMessage());
assertEquals(cause, exception.getCause());
InvalidRowSizeException exception = new InvalidRowSizeException(CAUSE);
assertEquals(CAUSE.toString(), exception.getMessage());
assertEquals(CAUSE, exception.getCause());
}
@Test
public void testConstructor_messageCause(){
InvalidRowSizeException exception = new InvalidRowSizeException(message, cause);
assertEquals(message, exception.getMessage());
assertEquals(cause, exception.getCause());
InvalidRowSizeException exception = new InvalidRowSizeException(MESSAGE, CAUSE);
assertEquals(MESSAGE, exception.getMessage());
assertEquals(CAUSE, exception.getCause());
}
}

View File

@@ -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;
@@ -11,8 +7,8 @@ import org.junit.jupiter.api.Test;
public class TestInvalidScalarException{
private static final String message = "message";
private static final Throwable cause = new Exception();
private static final String MESSAGE = "message";
private static final Throwable CAUSE = new Exception();
@Test
@@ -24,22 +20,22 @@ public class TestInvalidScalarException{
@Test
public void testConstructor_message(){
InvalidScalarException exception = new InvalidScalarException(message);
assertEquals(message, exception.getMessage());
InvalidScalarException exception = new InvalidScalarException(MESSAGE);
assertEquals(MESSAGE, exception.getMessage());
assertNull(exception.getCause());
}
@Test
public void testConstructor_cause(){
InvalidScalarException exception = new InvalidScalarException(cause);
assertEquals(cause.toString(), exception.getMessage());
assertEquals(cause, exception.getCause());
InvalidScalarException exception = new InvalidScalarException(CAUSE);
assertEquals(CAUSE.toString(), exception.getMessage());
assertEquals(CAUSE, exception.getCause());
}
@Test
public void testConstructor_messageCause(){
InvalidScalarException exception = new InvalidScalarException(message, cause);
assertEquals(message, exception.getMessage());
assertEquals(cause, exception.getCause());
InvalidScalarException exception = new InvalidScalarException(MESSAGE, CAUSE);
assertEquals(MESSAGE, exception.getMessage());
assertEquals(CAUSE, exception.getCause());
}
}

View File

@@ -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;
@@ -11,8 +7,8 @@ import org.junit.jupiter.api.Test;
public class TestNullMatrixException{
private static final String message = "message";
private static final Throwable cause = new Exception();
private static final String MESSAGE = "message";
private static final Throwable CAUSE = new Exception();
@Test
@@ -24,21 +20,21 @@ public class TestNullMatrixException{
@Test
public void testConstructor_message(){
NullMatrixException exception = new NullMatrixException(message);
assertEquals(message, exception.getMessage());
NullMatrixException exception = new NullMatrixException(MESSAGE);
assertEquals(MESSAGE, exception.getMessage());
assertNull(exception.getCause());
}
@Test
public void testConstructor_cause(){
NullMatrixException exception = new NullMatrixException(cause);
assertEquals(cause.toString(), exception.getMessage());
assertEquals(cause, exception.getCause());
NullMatrixException exception = new NullMatrixException(CAUSE);
assertEquals(CAUSE.toString(), exception.getMessage());
assertEquals(CAUSE, exception.getCause());
}
@Test
public void testConstructor_messageCause(){
NullMatrixException exception = new NullMatrixException(message, cause);
assertEquals(message, exception.getMessage());
assertEquals(cause, exception.getCause());
NullMatrixException exception = new NullMatrixException(MESSAGE, CAUSE);
assertEquals(MESSAGE, exception.getMessage());
assertEquals(CAUSE, exception.getCause());
}
}