Beispiel #1
0
        public void TestCopy()
        {
            string mon = "Monday";
            string tue = "Tuesday";
            string wed = "Wednesday";

            double monVal = 0.01d;
            double tueVal = 0.80d;
            double wedVal = 0.30d;

            Classification <string> result = new Classification <string>();

            result.SetActualValues(new[] { mon, tue, wed });
            result.SetStats(1, new[] { monVal, tueVal, wedVal });
            Assert.IsTrue(result.GetMostProbableValue(1).Equals(tue));
            Assert.IsNull(result.GetMostProbableValue(2));

            Classification <string> result2 = result.Copy();

            Assert.AreEqual(result, result2);

            result2.SetStats(1, new[] { monVal, tueVal, 0.5d });
            Assert.AreNotEqual(result, result2);
        }