@@ -0,0 +1,826 @@
+package org.stuygfx.math;%0A%0Aimport java.util.Arrays;%0A%0Apublic class Matrix %7B%0A%0A    public double%5B%5D%5B%5D data;%0A%0A    public Matrix(int rows, int cols) %7B%0A        data = new double%5Brows%5D%5Bcols%5D;%0A    %7D%0A%0A    public Matrix(double%5B%5D%5B%5D data) %7B%0A        this.data = data;%0A    %7D%0A%0A    public int rows() %7B%0A        return data.length;%0A    %7D%0A%0A    public int cols() %7B%0A        return data%5B0%5D.length;%0A    %7D%0A%0A    public void print() %7B%0A        for (int i = 0; i %3C data.length; i++) %7B%0A            System.out.println(Arrays.toString(data%5Bi%5D));%0A        %7D%0A    %7D%0A%0A    public Matrix clone() %7B%0A        Matrix clone = new Matrix(this.rows(), this.cols());%0A        for (int i = 0; i %3C this.rows(); i++) %7B%0A            for (int j = 0; j %3C this.cols(); j++) %7B%0A                clone.data%5Bi%5D%5Bj%5D = this.data%5Bi%5D%5Bj%5D;%0A            %7D%0A        %7D%0A        return clone;%0A    %7D%0A%7D%0A

Add Matrix class