import java.security.InvalidParameterException; public class Matrix { private double[][] tb; private Matrix(double[][] tb) { this.tb=tb; } public Matrix(int rows,int cols) { tb=new double[rows][cols]; } public int rows() { return tb.length; } public int cols() { return tb.length>0?tb[0].length:0; } public static Matrix parseMatrix(String source) { String[] Rows = source.split("[\r\n]+"); int rows=Rows.length; int cols=0; String[][] cells = new String[rows][]; for(int r=0; r0) sb.append('\t'); sb.append(String.format("%.2f",tb[r][c])); } sb.append(System.lineSeparator()); } return sb.toString(); } public static Matrix multiply(Matrix a,Matrix b) { int rows=1; int cols=1; Matrix m=new Matrix(rows,cols); ///m.tb[r][c] return m; } public static Matrix gauss(Matrix a,Matrix b) { int rows=1; int cols=1; Matrix m=new Matrix(rows,cols); ///m.tb[r][c] return m; }