예제 #1
0
파일: base.py 프로젝트: jjgreen/mvpoly
 def wendland(cls, d, k, **kwargs):
     """
     Return the output of :meth:`mvpoly.cube.MVPolyCube.wendland`
     converted to other polynomial subclasess.
     """
     from mvpoly.cube import MVPolyCube
     return cls(MVPolyCube.wendland(d, k, **kwargs), **kwargs)
예제 #2
0
파일: rbf.py 프로젝트: jjgreen/mvpoly
 def wendland(self):
     return MVPolyCube.wendland(self.dim, self.n)
예제 #3
0
 def test_wendland_dim5_order2(self) :
     r = self.r
     expected = (16*r*r + 7*r + 1) * (1 - r)**7
     obtained = MVPolyCube.wendland(5, 2)
     self.assertEqualUpToConstant(expected, obtained)
예제 #4
0
 def test_wendland_dim5_order1(self) :
     r = self.r
     expected = (5*r + 1) * (1 - r)**5
     obtained = MVPolyCube.wendland(5, 1)
     self.assertEqualUpToConstant(expected, obtained)
예제 #5
0
 def test_wendland_dim3_order3(self) :
     r = self.r
     expected = (32*r*r*r + 25*r*r + 8*r + 1) * (1 - r)**8
     obtained = MVPolyCube.wendland(3, 3)
     self.assertEqualUpToConstant(expected, obtained)
예제 #6
0
 def test_wendland_dim3_order2(self) :
     r = self.r
     expected = (35*r*r + 18*r + 3) * (1 - r)**6
     obtained = MVPolyCube.wendland(3, 2)
     self.assertEqualUpToConstant(expected, obtained)
예제 #7
0
 def test_wendland_dim1_order2(self) :
     r = self.r
     expected = (8*r*r + 5*r + 1) * (1 - r)**5
     obtained = MVPolyCube.wendland(1, 2)
     self.assertEqualUpToConstant(expected, obtained)
예제 #8
0
 def test_wendland_dim5_order0(self) :
     r = self.r
     expected = (1 - r)**3
     obtained = MVPolyCube.wendland(5, 0)
     self.assertTrue(expected == obtained, "{0!s}".format((obtained)))