예제 #1
0
 def test_linear(self):
     assert_allclose(mu_overlapping_linear(np.array([5,10,20,50,100]),
                                 np.array([1.5, 2, 1, 4, 8]),
                                 np.array([1.6, 1, 5, 4, 4])),
                     [1.040117086, 1.578343528,
                      2.253865374, 4.774441621,
                      6.625207688])
예제 #2
0
 def test_ideal(self):
     assert_allclose(mu_overlapping_linear(np.array([5,10,20,50,100]),
                                 np.array([1,1,1,2,1]),
                                 np.array([5,10,20,1,100])),
                     [0.936497825, 1.578343528,
                      2.253865374, 3.163688441,
                      3.855655749])
예제 #3
0
 def test_intersecting(self):
     assert_allclose(
         mu_overlapping_linear(np.array([5, 10]), np.array([7, 12]),
                               np.array([
                                   1.6,
                                   1.5,
                               ])), [1.387620117, 2.200268994])
예제 #4
0
 def test_all_disturbed(self):
     assert_allclose(
         mu_overlapping_linear(np.array([5, 10]), np.array([20, 30]),
                               np.array([
                                   1.6,
                                   1.5,
                               ])), [1.498396521, 2.367515292])
예제 #5
0
 def test_all_at_once(self):
     assert_allclose(mu_overlapping_linear(
                                 np.array([5,  10, 10, 10, 100]),
                                 np.array([1.5, 1, 30, 12, 8]),
                                 np.array([1.6, 1,1.5,1.5, 1])),
                     [1.040117086, 1.578343528,
                      2.367515292, 2.200268994,
                      3.855655749])
예제 #6
0
 def test_intersecting(self):
     assert_allclose(mu_overlapping_linear(np.array([5,10]),
                                 np.array([7, 12]),
                                 np.array([1.6, 1.5,])),
                     [1.387620117, 2.200268994])
예제 #7
0
 def test_all_disturbed(self):
     assert_allclose(mu_overlapping_linear(np.array([5,10]),
                                 np.array([20, 30]),
                                 np.array([1.6, 1.5,])),
                     [1.498396521, 2.367515292])