Sum() public method

Sum all of the values in the matrix.
public Sum ( ) : double
return double
 public void Sum()
 {
     double[][] doubleData = {
                                 new[] {1.0, 2.0},
                                 new[] {3.0, 4.0}
                             };
     var matrix = new Matrix(doubleData);
     Assert.AreEqual((int) matrix.Sum(), 1 + 2 + 3 + 4);
 }