SparseFieldMatrix extends AbstractFieldMatrix<T> { @Override public int getRowDimension() { return rows; } SparseFieldMatrix(final Field<T> field);  SparseFieldMatrix(final Field<T> field,
                             final int rowDimension, final int columnDimension);  SparseFieldMatrix(SparseFieldMatrix<T> other);  SparseFieldMatrix(FieldMatrix<T> other); @Override void addToEntry(int row, int column, T increment); @Override FieldMatrix<T> copy(); @Override FieldMatrix<T> createMatrix(int rowDimension, int columnDimension); @Override int getColumnDimension(); @Override T getEntry(int row, int column); @Override int getRowDimension(); @Override void multiplyEntry(int row, int column, T factor); @Override void setEntry(int row, int column, T value);  }
@Test public void testMath209() { FieldMatrix<Fraction> a = createSparseMatrix(new Fraction[][] { { new Fraction(1), new Fraction(2) }, { new Fraction(3), new Fraction(4) }, { new Fraction(5), new Fraction(6) } }); Fraction[] b = a.operate(new Fraction[] { new Fraction(1), new Fraction(1) }); Assert.assertEquals(a.getRowDimension(), b.length); Assert.assertEquals(3.0, b[0].doubleValue(), 1.0e-12); Assert.assertEquals(7.0, b[1].doubleValue(), 1.0e-12); Assert.assertEquals(11.0, b[2].doubleValue(), 1.0e-12); }