diff --git a/lib/jmat.core-1.1.0.jar b/lib/jmat.core-1.1.0.jar new file mode 100644 index 0000000..e2bdf12 Binary files /dev/null and b/lib/jmat.core-1.1.0.jar differ diff --git a/src/hbb/HelloWorld.java b/src/hbb/HelloWorld.java index 616f27e..62fddbf 100644 --- a/src/hbb/HelloWorld.java +++ b/src/hbb/HelloWorld.java @@ -1,7 +1,44 @@ package hbb; +import java.lang.Double; +import main.java.matrices.util.MatMaths; +import main.java.matrices.DMatrix; + public class HelloWorld { public static void main(String[] args) { - System.out.println("Hello World"); + Double[][] array = {{1.,3.},{2.,7.}}; + Double[][] arrOne = {{1.,1.,1.},{1.,1.,1.},{1.,1.,1.}}; + Double[][] arrTwo = {{2.,2.,2.},{2.,2.,2.},{2.,2.,2.}}; + Double[][] mArray = {{2.},{3.},{4.}}; + Double[][] pArray = {{1.,6.}}; + + DMatrix matrix = new DMatrix(array); + DMatrix matrixOne = new DMatrix(arrOne); + DMatrix matrixTwo = new DMatrix(arrTwo); + DMatrix m = new DMatrix(mArray); + DMatrix p = new DMatrix(pArray); + DMatrix inverseMatrix = MatMaths.inverseOf(matrix); + DMatrix addMatrix = MatMaths.add(matrixOne,matrixTwo); + DMatrix multMatrix = MatMaths.mul(m,p); + + System.out.println("First Matrix:"); + /* + for (Double matValue : matrix) { + System.out.println(matValue); + } + */ + matrix.show(); + + System.out.println("Inverted Matrix:"); + inverseMatrix.show(); + + System.out.println("Add Matrix:"); + addMatrix.show(); + System.out.println("m Matrix:"); + m.show(); + System.out.println("p Matrix:"); + p.show(); + System.out.println("Multiply Matrix:"); + multMatrix.show(); } }