IsZero() public method

Determine if all of the values in the matrix are zero.
public IsZero ( ) : bool
return bool
Beispiel #1
0
        public void IsZero()
        {
            double[] matrixData = { 1.0, 2.0, 3.0, 4.0 };
            Matrix   matrix     = Matrix.CreateColumnMatrix(matrixData);

            Assert.IsFalse(matrix.IsZero());
            double[] matrixData2 = { 0.0, 0.0, 0.0, 0.0 };
            Matrix   matrix2     = Matrix.CreateColumnMatrix(matrixData2);

            Assert.IsTrue(matrix2.IsZero());
        }
Beispiel #2
0
        public void Zero()
        {
            double[][] doubleData =
            {
                new[] { 0.0, 0.0 },
                new[] { 0.0, 0.0 }
            };
            var matrix = new Matrix(doubleData);

            Assert.IsTrue(matrix.IsZero());
        }
 public void Zero()
 {
     double[][] doubleData = {
                                 new[] {0.0, 0.0},
                                 new[] {0.0, 0.0}
                             };
     var matrix = new Matrix(doubleData);
     Assert.IsTrue(matrix.IsZero());
 }