/** * @param index index * @return imaginary component */ public T getImaginary( int index ) { return get( imaginary, index ); }
/** Returns the value at the given index for non-complex arrays. */ public T get(int m, int n) { return get(getIndex(m, n)); }
/** Returns the value at the given index for non-complex arrays. */ public T get(int... indices) { return get(getIndex(indices)); }
/** * @param index * @return */ public T getImaginary( int index ) { return get( imaginary, index ); }
/** Returns the value at the given index for non-complex arrays. */ public T get(int m, int n) { return get(getIndex(m, n)); }
/** * @param index * @return */ public T getReal( int index ) { return get(real, index); }
/** Returns the value at the given index for non-complex arrays. */ public T get(int... indices) { return get(getIndex(indices)); }
/** * @param index index * @return real */ public T getReal( int index ) { return get(real, index); }
/** * @param index index * @return value */ public T get ( int index ) { if ( isComplex() ) { throw new IllegalStateException("Cannot use this method for Complex matrices"); } return get( real, index ); } /**
/** * @param index * @return */ public T get ( int index ) { if ( isComplex() ) { throw new IllegalStateException("Cannot use this method for Complex matrices"); } return get( real, index ); } /**
@Test public void testBenchmarkUInt8() throws Exception { final String fileName = "bigbyte.mat"; final String name = "bigbyte"; final int SIZE = 1024; MLUInt8 mluint8 = new MLUInt8(name, new int[]{SIZE, SIZE}); // write array to file ArrayList<MLArray> list = new ArrayList<MLArray>(); list.add(mluint8); // write arrays to file new MatFileWriter(getTempFile(fileName), list); // read array form file MatFileReader mfr = new MatFileReader(getTempFile(fileName)); MLArray mlArrayRetrived = mfr.getMLArray(name); for (int i = 0; i < mlArrayRetrived.getSize(); i++) { ((MLNumericArray<?>) mlArrayRetrived).get(i); } // test if MLArray objects are equal assertEquals("Test if value red from file equals value stored", mluint8, mlArrayRetrived); }