46474849505152535455
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); DataInputStream in = new DataInputStream(bais); DoubleMatrix readMat = MatrixWritable.readSparseMatrix(in); assertEquals(0.0d, mat.subtract(readMat).sum(), 1e-4); } }