public static void testSparseArrayBuild(MatrixBuilder builder,
Matrix m,
boolean transposed) {
// Write the matrix to the file using the given builder.
for (int r = 0; r < m.rows(); ++r)
builder.addColumn(new SparseDoubleArray(m.getRow(r)));
builder.finish();
if (transposed)
checkMatrixTransposed(builder, m);
else