示例#1
0
 def initfun_fixedlen(cls, f, n, domain=None):
     nn = np.array(n)
     if nn.size < 2:
         funs = generate_funs(domain, Bndfun.initfun_fixedlen, {
             'f': f,
             'n': n
         })
     else:
         domain = Domain(domain if domain is not None else prefs.domain)
         if not nn.size == domain.size - 1: raise BadFunLengthArgument
         funs = []
         for interval, length in zip(domain.intervals, nn):
             funs.append(Bndfun.initfun_fixedlen(f, interval, length))
     return cls(funs)
示例#2
0
 def initfun_adaptive(cls, f, domain=DefaultPrefs.domain):
     funs = generate_funs(domain, Bndfun.initfun_adaptive, [f])
     return cls(funs)
示例#3
0
 def initidentity(cls, domain=DefaultPrefs.domain):
     funs = generate_funs(domain, Bndfun.initidentity)
     return cls(funs)
示例#4
0
 def initconst(cls, c, domain=DefaultPrefs.domain):
     funs = generate_funs(domain, Bndfun.initconst, [c])
     return cls(funs)
示例#5
0
文件: chebfun.py 项目: chebpy/chebpy
 def initfun_adaptive(cls, f, domain=DefaultPrefs.domain):
     funs = generate_funs(domain, Bndfun.initfun_adaptive, [f])
     return cls(funs)
示例#6
0
文件: chebfun.py 项目: chebpy/chebpy
 def initidentity(cls, domain=DefaultPrefs.domain):
     funs = generate_funs(domain, Bndfun.initidentity)
     return cls(funs)
示例#7
0
文件: chebfun.py 项目: chebpy/chebpy
 def initconst(cls, c, domain=DefaultPrefs.domain):
     funs = generate_funs(domain, Bndfun.initconst, [c])
     return cls(funs)
示例#8
0
 def initfun_adaptive(cls, f, domain=None):
     domain = domain if domain is not None else prefs.domain
     funs = generate_funs(domain, Bndfun.initfun_adaptive, [f])
     return cls(funs)
示例#9
0
 def initidentity(cls, domain=None):
     domain = domain if domain is not None else prefs.domain
     funs = generate_funs(domain, Bndfun.initidentity)
     return cls(funs)
示例#10
0
 def initconst(cls, c, domain=None):
     domain = domain if domain is not None else prefs.domain
     funs = generate_funs(domain, Bndfun.initconst, [c])
     return cls(funs)
示例#11
0
 def initfun_adaptive(cls, f, domain=None):
     return cls(generate_funs(domain, Bndfun.initfun_adaptive, {'f': f}))
示例#12
0
 def initconst(cls, c, domain=None):
     return cls(generate_funs(domain, Bndfun.initconst, {'c': c}))
示例#13
0
 def initidentity(cls, domain=None):
     return cls(generate_funs(domain, Bndfun.initidentity))