コード例 #1
0
ファイル: test_cubature.py プロジェクト: antonl/cubature
def test_cubature_three_exact():
    d = 8
    xmin = -np.ones((d,))
    xmax = np.ones((d,))

    val = ti.cubature_three_exact(xmin, xmax)
    assert np.abs(val) < 1e-14

    xmin = np.zeros((d,))
    xmax = np.ones((d,))

    val = ti.cubature_three_exact(xmin, xmax)
    assert np.abs(val - 1) < 1e-14
コード例 #2
0
ファイル: test_cubature.py プロジェクト: B-Rich/cubature-1
def test_cubature_three_exact():
    d = 8
    xmin = -np.ones((d, ))
    xmax = np.ones((d, ))

    val = ti.cubature_three_exact(xmin, xmax)
    assert np.abs(val) < 1e-14

    xmin = np.zeros((d, ))
    xmax = np.ones((d, ))

    val = ti.cubature_three_exact(xmin, xmax)
    assert np.abs(val - 1) < 1e-14
コード例 #3
0
ファイル: test_cubature.py プロジェクト: antonl/cubature
def test_hcubature_cubature_three():
    d = 8
    xmin = np.zeros((d,))
    xmax = np.ones((d,))

    exact = ti.cubature_three_exact(xmin, xmax)

    val, err = cubature(ti.cubature_three, d, 1, xmin, xmax)

    assert np.allclose([exact], [val])
コード例 #4
0
ファイル: test_cubature.py プロジェクト: B-Rich/cubature-1
def test_hcubature_cubature_three():
    d = 8
    xmin = np.zeros((d, ))
    xmax = np.ones((d, ))

    exact = ti.cubature_three_exact(xmin, xmax)

    val, err = cubature(ti.cubature_three, d, 1, xmin, xmax)

    assert np.allclose([exact], [val])