本文整理汇总了Python中geographiclib.geomath.Math.polyval方法的典型用法代码示例。如果您正苦于以下问题:Python Math.polyval方法的具体用法?Python Math.polyval怎么用?Python Math.polyval使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类geographiclib.geomath.Math
的用法示例。
在下文中一共展示了Math.polyval方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: C4coeff
# 需要导入模块: from geographiclib.geomath import Math [as 别名]
# 或者: from geographiclib.geomath.Math import polyval [as 别名]
def C4coeff(self):
"""Private: return coefficients for C4"""
coeff = [
97, 15015,
1088, 156, 45045,
-224, -4784, 1573, 45045,
-10656, 14144, -4576, -858, 45045,
64, 624, -4576, 6864, -3003, 15015,
100, 208, 572, 3432, -12012, 30030, 45045,
1, 9009,
-2944, 468, 135135,
5792, 1040, -1287, 135135,
5952, -11648, 9152, -2574, 135135,
-64, -624, 4576, -6864, 3003, 135135,
8, 10725,
1856, -936, 225225,
-8448, 4992, -1144, 225225,
-1440, 4160, -4576, 1716, 225225,
-136, 63063,
1024, -208, 105105,
3584, -3328, 1144, 315315,
-128, 135135,
-2560, 832, 405405,
128, 99099,
]
o = 0; k = 0
for l in range(Geodesic.nC4_): # l is index of C4[l]
for j in range(Geodesic.nC4_ - 1, l - 1, -1): # coeff of eps^j
m = Geodesic.nC4_ - j - 1 # order of polynomial in n
self._C4x[k] = Math.polyval(m, coeff, o, self._n) / coeff[o + m + 1]
k += 1
o += m + 2
示例2: C3coeff
# 需要导入模块: from geographiclib.geomath import Math [as 别名]
# 或者: from geographiclib.geomath.Math import polyval [as 别名]
def C3coeff(self):
"""Private: return coefficients for C3"""
coeff = [
3, 128,
2, 5, 128,
-1, 3, 3, 64,
-1, 0, 1, 8,
-1, 1, 4,
5, 256,
1, 3, 128,
-3, -2, 3, 64,
1, -3, 2, 32,
7, 512,
-10, 9, 384,
5, -9, 5, 192,
7, 512,
-14, 7, 512,
21, 2560,
]
o = 0; k = 0
for l in range(1, Geodesic.nC3_): # l is index of C3[l]
for j in range(Geodesic.nC3_ - 1, l - 1, -1): # coeff of eps^j
m = min(Geodesic.nC3_ - j - 1, j) # order of polynomial in n
self._C3x[k] = Math.polyval(m, coeff, o, self._n) / coeff[o + m + 1]
k += 1
o += m + 2
示例3: A2m1f
# 需要导入模块: from geographiclib.geomath import Math [as 别名]
# 或者: from geographiclib.geomath.Math import polyval [as 别名]
def A2m1f(eps):
"""Private: return A2-1"""
coeff = [
25, 36, 64, 0, 256,
]
m = Geodesic.nA2_//2
t = Math.polyval(m, coeff, 0, Math.sq(eps)) / coeff[m + 1]
return t * (1 - eps) - eps
示例4: A1m1f
# 需要导入模块: from geographiclib.geomath import Math [as 别名]
# 或者: from geographiclib.geomath.Math import polyval [as 别名]
def A1m1f(eps):
"""Private: return A1-1."""
coeff = [
1, 4, 64, 0, 256,
]
m = Geodesic.nA1_//2
t = Math.polyval(m, coeff, 0, Math.sq(eps)) / coeff[m + 1]
return (t + eps) / (1 - eps)
示例5: C4f
# 需要导入模块: from geographiclib.geomath import Math [as 别名]
# 或者: from geographiclib.geomath.Math import polyval [as 别名]
def C4f(self, eps, c):
"""Private: return C4"""
# Evaluate C4 coeffs by Horner's method
# Elements c[0] thru c[nC4_ - 1] are set
mult = 1
o = 0
for l in range(Geodesic.nC4_): # l is index of C4[l]
m = Geodesic.nC4_ - l - 1 # order of polynomial in eps
c[l] = mult * Math.polyval(m, self._C4x, o, eps)
o += m + 1
mult *= eps
示例6: C3f
# 需要导入模块: from geographiclib.geomath import Math [as 别名]
# 或者: from geographiclib.geomath.Math import polyval [as 别名]
def C3f(self, eps, c):
"""Private: return C3"""
# Evaluate C3
# Elements c[1] thru c[nC3_ - 1] are set
mult = 1
o = 0
for l in range(1, Geodesic.nC3_): # l is index of C3[l]
m = Geodesic.nC3_ - l - 1 # order of polynomial in eps
mult *= eps
c[l] = mult * Math.polyval(m, self._C3x, o, eps)
o += m + 1
示例7: A3coeff
# 需要导入模块: from geographiclib.geomath import Math [as 别名]
# 或者: from geographiclib.geomath.Math import polyval [as 别名]
def A3coeff(self):
"""Private: return coefficients for A3"""
coeff = [
-3, 128,
-2, -3, 64,
-1, -3, -1, 16,
3, -1, -2, 8,
1, -1, 2,
1, 1,
]
o = 0; k = 0
for j in range(Geodesic.nA3_ - 1, -1, -1): # coeff of eps^j
m = min(Geodesic.nA3_ - j - 1, j) # order of polynomial in n
self._A3x[k] = Math.polyval(m, coeff, o, self._n) / coeff[o + m + 1]
k += 1
o += m + 2
示例8: C2f
# 需要导入模块: from geographiclib.geomath import Math [as 别名]
# 或者: from geographiclib.geomath.Math import polyval [as 别名]
def C2f(eps, c):
"""Private: return C2"""
coeff = [
1, 2, 16, 32,
35, 64, 384, 2048,
15, 80, 768,
7, 35, 512,
63, 1280,
77, 2048,
]
eps2 = Math.sq(eps)
d = eps
o = 0
for l in range(1, Geodesic.nC2_ + 1): # l is index of C2[l]
m = (Geodesic.nC2_ - l) // 2 # order of polynomial in eps^2
c[l] = d * Math.polyval(m, coeff, o, eps2) / coeff[o + m + 1]
o += m + 2
d *= eps
示例9: C1pf
# 需要导入模块: from geographiclib.geomath import Math [as 别名]
# 或者: from geographiclib.geomath.Math import polyval [as 别名]
def C1pf(eps, c):
"""Private: return C1'"""
coeff = [
205, -432, 768, 1536,
4005, -4736, 3840, 12288,
-225, 116, 384,
-7173, 2695, 7680,
3467, 7680,
38081, 61440,
]
eps2 = Math.sq(eps)
d = eps
o = 0
for l in range(1, Geodesic.nC1p_ + 1): # l is index of C1p[l]
m = (Geodesic.nC1p_ - l) // 2 # order of polynomial in eps^2
c[l] = d * Math.polyval(m, coeff, o, eps2) / coeff[o + m + 1]
o += m + 2
d *= eps
示例10: C1f
# 需要导入模块: from geographiclib.geomath import Math [as 别名]
# 或者: from geographiclib.geomath.Math import polyval [as 别名]
def C1f(eps, c):
"""Private: return C1."""
coeff = [
-1, 6, -16, 32,
-9, 64, -128, 2048,
9, -16, 768,
3, -5, 512,
-7, 1280,
-7, 2048,
]
eps2 = Math.sq(eps)
d = eps
o = 0
for l in range(1, Geodesic.nC1_ + 1): # l is index of C1p[l]
m = (Geodesic.nC1_ - l) // 2 # order of polynomial in eps^2
c[l] = d * Math.polyval(m, coeff, o, eps2) / coeff[o + m + 1]
o += m + 2
d *= eps
示例11: A3f
# 需要导入模块: from geographiclib.geomath import Math [as 别名]
# 或者: from geographiclib.geomath.Math import polyval [as 别名]
def A3f(self, eps):
"""Private: return A3"""
# Evaluate A3
return Math.polyval(Geodesic.nA3_ - 1, self._A3x, 0, eps)