return a;
}
public void testMatrixnSerializable () throws IOException, ClassNotFoundException
{
Matrixn a = make3dMatrix ();
Matrixn b = (Matrixn) TestSerializable.cloneViaSerialization (a);
assertEquals (a.singleSize(), b.singleSize());
for (int i = 0; i < a.singleSize (); i++) {
int[] idxa = new int [a.getNumDimensions ()];
int[] idxb = new int [a.getNumDimensions ()];
a.singleToIndices (i, idxa);
b.singleToIndices (i, idxb);
assertTrue (Arrays.equals (idxa, idxb));
assertEquals (a.value (idxa), b.value (idxb), 1e-12);
}
}