public void EntropyTest() { var target = new GeneralDiscreteDistribution(42, 0.1, 0.4, 0.5); double expected = -0.1 * System.Math.Log(0.1) + -0.4 * System.Math.Log(0.4) + -0.5 * System.Math.Log(0.5); Assert.AreEqual(expected, target.Entropy); }