RealMatrix { public double[][] getData() { code.clearOnline(); code.addRCode(this.HashString + "<- t(" + this.name + ")"); rcaller.runAndReturnResultOnline(this.HashString); int[] dims = rcaller.getParser().getDimensions(this.HashString); return (rcaller.getParser().getAsDoubleMatrix(this.HashString, dims[0], dims[1])); } RealMatrix(RService service);  RealMatrix(String pathToR, String name); RCaller getRCaller(); void setData(double[][] data); int[] getDimensions(); double[][] getData(); double[] getColumn(int column); double[][] getColumns(int[] columns); double[] getRow(int row); double[][] getRows(int[] rows); double getDeterminant(); RealMatrix getInverse(); double[] getDiagonal(); double getTrace(); RealMatrix getTranspose(); RealMatrix product(double[][] another); RealMatrix product(RealMatrix another); RealMatrix sum(double[][] another); RealMatrix sum(RealMatrix another); RealMatrix productWithScaler(double scaler); RealMatrix subtract(double[][] another); RealMatrix subtract(RealMatrix another); double[] getEigenValues(); RealMatrix getEigenVectors(); SVD getSVD();  }
@Test public void testSetGetData() { System.out.println("setData and GetData: "); double[][] nm = rm.getData(); assertEquals(nm[0][0], matrix[0][0], delta); assertEquals(nm[0][1], matrix[0][1], delta); assertEquals(nm[1][0], matrix[1][0], delta); assertEquals(nm[1][1], matrix[1][1], delta); }