public void TestNorm() { var m1 = new VectorD(1.0, 2.0, 3.0, 4.0).ToMatrix(2, 2); var normO = m1.Norm(MatrixNormType.O); Assert.AreEqual<double>(7.0, normO); var normI = m1.Norm(MatrixNormType.I); Assert.AreEqual<double>(6.0, normI); var normF = Math.Round(m1.Norm(MatrixNormType.F), 6); Assert.AreEqual<double>(5.477226, normF); var normM = m1.Norm(MatrixNormType.M); Assert.AreEqual<double>(4.0, normM); }