Beispiel #1
0
        public void ValueWhenXIsOutOfRange()
        {
            TriangularFunction func = new TriangularFunction(1.0, 2.0);

            Assert.AreEqual(func.Value(0.8), 0);
            Assert.AreEqual(func.Value(2.1), 0);
        }
Beispiel #2
0
        public void ValueWhenXIsIsBetweenCandB()
        {
            TriangularFunction func = new TriangularFunction(0.0, 4.0);

            Assert.AreEqual(func.Value(3.0), 0.5);
        }
Beispiel #3
0
        public void ValueWhenXIsIsInTheMiddleOfTheTriangle()
        {
            TriangularFunction func = new TriangularFunction(1.0, 2.0);

            Assert.AreEqual(func.Value(1.5), 1);
        }
Beispiel #4
0
        public void ValueWhenXIsOnTheEdgeOfTheFunction()
        {
            TriangularFunction func = new TriangularFunction(1.0, 2.0);

            Assert.AreEqual(func.Value(2.0), 0);
        }