コード例 #1
0
    def test9(self):
        matrix = readFile.getArray(
            os.path.dirname(os.path.abspath(__file__)) + '/arrays/data9.txt')
        result = adaptationFunction.J(matrix, [2, 6, 2], [7, 6, 7], [0, 0, 0],
                                      3)

        self.assertEqual(result, 0.3457, 'should fill up array correctly')
コード例 #2
0
    def test1(self):
        matrix = readFile.getArray(
            os.path.dirname(os.path.abspath(__file__)) + '/arrays/data.txt')
        result = adaptationFunction.J(matrix, [3, 3, 3], [4, 4, 4], [0, 0, 0],
                                      3)

        self.assertEqual(result, 0.1975, 'should fill up array correctly')
コード例 #3
0
    def test8(self):
        matrix = readFile.getArray(
            os.path.dirname(os.path.abspath(__file__)) + '/arrays/data7.txt')
        result = adaptationFunction.J(matrix, [0], [10], [0], 100)

        self.assertEqual(result, 0.7, 'should fill up array correctly')