diff --git a/404.html b/404.html index 0bf81f5..b665c0f 100644 --- a/404.html +++ b/404.html @@ -15,7 +15,7 @@
- + \ No newline at end of file diff --git a/api-ex.html b/api-ex.html index 11e068b..ffc1ae8 100644 --- a/api-ex.html +++ b/api-ex.html @@ -453,7 +453,7 @@ }

Page Frontmatter

{
   "outline": "deep"
 }

More

Check out the documentation for the full list of runtime APIs.

- + \ No newline at end of file diff --git a/api/index.html b/api/index.html index 549b0f5..70aee41 100644 --- a/api/index.html +++ b/api/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/api/mp_math/angle.html b/api/mp_math/angle.html index f9f0519..e278edd 100644 --- a/api/mp_math/angle.html +++ b/api/mp_math/angle.html @@ -116,7 +116,7 @@ if isinstance(other, AnyAngle): return self.radian / other.radian return AnyAngle(self.radian / other, is_radian=True) - + \ No newline at end of file diff --git a/api/mp_math/const.html b/api/mp_math/const.html index d5ee94a..c86dd9c 100644 --- a/api/mp_math/const.html +++ b/api/mp_math/const.html @@ -12,13 +12,13 @@ - + -
Skip to content
- +
Skip to content

var EPSILON = 0.0001

  • 说明: ε

var APPROX = 0.001

  • 说明: 约等于误差
+ \ No newline at end of file diff --git a/api/mp_math/equation.html b/api/mp_math/equation.html index 19a7cf6..16dae5a 100644 --- a/api/mp_math/equation.html +++ b/api/mp_math/equation.html @@ -12,7 +12,7 @@ - + @@ -47,16 +47,7 @@ return result_func(*args) return high_order_partial_derivative_func else: - raise ValueError('Invalid var type')

func partial_derivative_func() -> Var

源代码
python
def partial_derivative_func(*args: Var) -> Var:
-    args_list_plus = list(args)
-    args_list_plus[var] += epsilon
-    args_list_minus = list(args)
-    args_list_minus[var] -= epsilon
-    return (func(*args_list_plus) - func(*args_list_minus)) / (2 * epsilon)

func high_order_partial_derivative_func() -> Var

源代码
python
def high_order_partial_derivative_func(*args: Var) -> Var:
-    result_func = func
-    for v in var:
-        result_func = get_partial_derivative_func(result_func, v, epsilon)
-    return result_func(*args)

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

说明: 曲线方程。

参数:

源代码
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+        raise ValueError('Invalid var type')

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

说明: 曲线方程。

参数:

源代码
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
     """
         曲线方程。
         Args:
@@ -79,7 +70,7 @@
         return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
     else:
         return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
- + \ No newline at end of file diff --git a/api/mp_math/index.html b/api/mp_math/index.html index 13012e4..4952d61 100644 --- a/api/mp_math/index.html +++ b/api/mp_math/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/api/mp_math/line.html b/api/mp_math/line.html index 74036a1..daf27d8 100644 --- a/api/mp_math/line.html +++ b/api/mp_math/line.html @@ -195,7 +195,7 @@ """ return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction) - + \ No newline at end of file diff --git a/api/mp_math/mp_math_typing.html b/api/mp_math/mp_math_typing.html index adcd8e6..0b9d493 100644 --- a/api/mp_math/mp_math_typing.html +++ b/api/mp_math/mp_math_typing.html @@ -12,13 +12,13 @@ - + -
Skip to content

var RealNumber = int | float

  • 类型: TypeAlias

  • 说明: 实数

var Number = RealNumber | complex

  • 类型: TypeAlias

  • 说明: 数

var Var = SingleVar | ArrayVar

  • 类型: TypeAlias

  • 说明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • 类型: TypeAlias

  • 说明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • 类型: TypeAlias

  • 说明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • 类型: TypeAlias

  • 说明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • 类型: TypeAlias

  • 说明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • 类型: TypeAlias

  • 说明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • 类型: TypeAlias

  • 说明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • 类型: TypeAlias

  • 说明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • 类型: TypeAlias

  • 说明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • 类型: TypeAlias

  • 说明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • 类型: TypeAlias

  • 说明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • 类型: TypeAlias

  • 说明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • 类型: TypeAlias

  • 说明: 多元函数

- +
Skip to content

var RealNumber = int | float

  • 类型: TypeAlias

  • 说明: 实数

var Number = RealNumber | complex

  • 类型: TypeAlias

  • 说明: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • 说明: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • 说明: 数组变量

var Var = SingleVar | ArrayVar

  • 类型: TypeAlias

  • 说明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • 类型: TypeAlias

  • 说明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • 类型: TypeAlias

  • 说明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • 类型: TypeAlias

  • 说明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • 类型: TypeAlias

  • 说明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • 类型: TypeAlias

  • 说明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • 类型: TypeAlias

  • 说明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • 类型: TypeAlias

  • 说明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • 类型: TypeAlias

  • 说明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • 类型: TypeAlias

  • 说明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • 类型: TypeAlias

  • 说明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • 类型: TypeAlias

  • 说明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • 类型: TypeAlias

  • 说明: 多元函数

+ \ No newline at end of file diff --git a/api/mp_math/plane.html b/api/mp_math/plane.html index b438ee6..f9fe0cd 100644 --- a/api/mp_math/plane.html +++ b/api/mp_math/plane.html @@ -213,7 +213,7 @@ raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

源代码
python
def __eq__(self, other) -> bool:
     return self.approx(other)

method __rand__(self, other: Line3) -> Point3

源代码
python
def __rand__(self, other: 'Line3') -> 'Point3':
     return self.cal_intersection_point3(other)
- + \ No newline at end of file diff --git a/api/mp_math/point.html b/api/mp_math/point.html index c83b20d..6b5adb7 100644 --- a/api/mp_math/point.html +++ b/api/mp_math/point.html @@ -68,7 +68,7 @@ """ from .vector import Vector3 return Vector3(self.x - other.x, self.y - other.y, self.z - other.z) - + \ No newline at end of file diff --git a/api/mp_math/segment.html b/api/mp_math/segment.html index b4a08ce..fd9e918 100644 --- a/api/mp_math/segment.html +++ b/api/mp_math/segment.html @@ -31,7 +31,7 @@ self.length = self.direction.length '中心点' self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2) - + \ No newline at end of file diff --git a/api/mp_math/utils.html b/api/mp_math/utils.html index 89c4037..561e198 100644 --- a/api/mp_math/utils.html +++ b/api/mp_math/utils.html @@ -81,7 +81,7 @@ self.raise_type_error(other)

method raise_type_error(self, other)

源代码
python
def raise_type_error(self, other):
     raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

源代码
python
def __ne__(self, other):
     return not self.__eq__(other)
- + \ No newline at end of file diff --git a/api/mp_math/vector.html b/api/mp_math/vector.html index 9d30519..3c2dc6c 100644 --- a/api/mp_math/vector.html +++ b/api/mp_math/vector.html @@ -204,7 +204,7 @@ return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

源代码
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
     return Vector3(self.x / other, self.y / other, self.z / other)

method - self

源代码
python
def __neg__(self):
     return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

var x_axis = Vector3(1, 0, 0)

var y_axis = Vector3(0, 1, 0)

var z_axis = Vector3(0, 0, 1)

- + \ No newline at end of file diff --git a/api/particle/index.html b/api/particle/index.html index 9824f0f..616edc3 100644 --- a/api/particle/index.html +++ b/api/particle/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/api/presets/index.html b/api/presets/index.html index e93408b..7ad81f6 100644 --- a/api/presets/index.html +++ b/api/presets/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/api/presets/model/index.html b/api/presets/model/index.html index 06b6550..ea35564 100644 --- a/api/presets/model/index.html +++ b/api/presets/model/index.html @@ -35,7 +35,7 @@ y_array = radius * np.sin(phi_list) * np.sin(theta_list) z_array = radius * np.cos(phi_list) return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)] - + \ No newline at end of file diff --git a/assets/api_mp_math_const.md.BzOZuyZq.js b/assets/api_mp_math_const.md.BzOZuyZq.js deleted file mode 100644 index c3e009c..0000000 --- a/assets/api_mp_math_const.md.BzOZuyZq.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as a,o as e}from"./chunks/framework.BV61Qrc0.js";const d=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"api/mp_math/const.md","filePath":"api/mp_math/const.md"}'),c={name:"api/mp_math/const.md"};function o(s,m,n,p,r,_){return e(),a("div")}const h=t(c,[["render",o]]);export{d as __pageData,h as default}; diff --git a/assets/api_mp_math_const.md.BzOZuyZq.lean.js b/assets/api_mp_math_const.md.BzOZuyZq.lean.js deleted file mode 100644 index c3e009c..0000000 --- a/assets/api_mp_math_const.md.BzOZuyZq.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as a,o as e}from"./chunks/framework.BV61Qrc0.js";const d=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"api/mp_math/const.md","filePath":"api/mp_math/const.md"}'),c={name:"api/mp_math/const.md"};function o(s,m,n,p,r,_){return e(),a("div")}const h=t(c,[["render",o]]);export{d as __pageData,h as default}; diff --git a/assets/api_mp_math_const.md.D9zs7__H.js b/assets/api_mp_math_const.md.D9zs7__H.js new file mode 100644 index 0000000..468f064 --- /dev/null +++ b/assets/api_mp_math_const.md.D9zs7__H.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"api/mp_math/const.md","filePath":"api/mp_math/const.md"}'),r={name:"api/mp_math/const.md"},s=o('

var EPSILON = 0.0001

var APPROX = 0.001

',4),n=[s];function c(_,i,l,m,p,d){return e(),t("div",null,n)}const P=a(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/api_mp_math_const.md.D9zs7__H.lean.js b/assets/api_mp_math_const.md.D9zs7__H.lean.js new file mode 100644 index 0000000..25ef09e --- /dev/null +++ b/assets/api_mp_math_const.md.D9zs7__H.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"api/mp_math/const.md","filePath":"api/mp_math/const.md"}'),r={name:"api/mp_math/const.md"},s=o("",4),n=[s];function c(_,i,l,m,p,d){return e(),t("div",null,n)}const P=a(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/api_mp_math_equation.md.Ck19tFkF.js b/assets/api_mp_math_equation.md.BcXDoPv-.js similarity index 70% rename from assets/api_mp_math_equation.md.Ck19tFkF.js rename to assets/api_mp_math_equation.md.BcXDoPv-.js index e4e06a3..6be8850 100644 --- a/assets/api_mp_math_equation.md.Ck19tFkF.js +++ b/assets/api_mp_math_equation.md.BcXDoPv-.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"api/mp_math/equation.md","filePath":"api/mp_math/equation.md"}'),l={name:"api/mp_math/equation.md"},t=n(`

func get_partial_derivative_func(func: MultiVarsFunc = EPSILON) -> MultiVarsFunc

说明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

参数:

返回: 偏导函数

引发:

源代码
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"api/mp_math/equation.md","filePath":"api/mp_math/equation.md"}'),l={name:"api/mp_math/equation.md"},t=n(`

func get_partial_derivative_func(func: MultiVarsFunc = EPSILON) -> MultiVarsFunc

说明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

参数:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

返回: 偏导函数

引发:

  • ValueError 无效变量类型
源代码
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
     """
     求N元函数一阶偏导函数。这玩意不太稳定,慎用。
     Args:
@@ -28,16 +28,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y
             return result_func(*args)
         return high_order_partial_derivative_func
     else:
-        raise ValueError('Invalid var type')

func partial_derivative_func() -> Var

源代码
python
def partial_derivative_func(*args: Var) -> Var:
-    args_list_plus = list(args)
-    args_list_plus[var] += epsilon
-    args_list_minus = list(args)
-    args_list_minus[var] -= epsilon
-    return (func(*args_list_plus) - func(*args_list_minus)) / (2 * epsilon)

func high_order_partial_derivative_func() -> Var

源代码
python
def high_order_partial_derivative_func(*args: Var) -> Var:
-    result_func = func
-    for v in var:
-        result_func = get_partial_derivative_func(result_func, v, epsilon)
-    return result_func(*args)

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

说明: 曲线方程。

参数:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
源代码
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+        raise ValueError('Invalid var type')

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

说明: 曲线方程。

参数:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
源代码
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
     """
         曲线方程。
         Args:
@@ -59,4 +50,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y
     if len(t) == 1:
         return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
     else:
-        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
`,23),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const u=s(l,[["render",p]]);export{y as __pageData,u as default}; + return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
`,19),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{u as __pageData,y as default}; diff --git a/assets/api_mp_math_equation.md.Ck19tFkF.lean.js b/assets/api_mp_math_equation.md.BcXDoPv-.lean.js similarity index 57% rename from assets/api_mp_math_equation.md.Ck19tFkF.lean.js rename to assets/api_mp_math_equation.md.BcXDoPv-.lean.js index c988365..af2da64 100644 --- a/assets/api_mp_math_equation.md.Ck19tFkF.lean.js +++ b/assets/api_mp_math_equation.md.BcXDoPv-.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"api/mp_math/equation.md","filePath":"api/mp_math/equation.md"}'),l={name:"api/mp_math/equation.md"},t=n("",23),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const u=s(l,[["render",p]]);export{y as __pageData,u as default}; +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"api/mp_math/equation.md","filePath":"api/mp_math/equation.md"}'),l={name:"api/mp_math/equation.md"},t=n("",19),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{u as __pageData,y as default}; diff --git a/assets/api_mp_math_mp_math_typing.md.COrE_fd3.js b/assets/api_mp_math_mp_math_typing.md.COrE_fd3.js new file mode 100644 index 0000000..3309a29 --- /dev/null +++ b/assets/api_mp_math_mp_math_typing.md.COrE_fd3.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"api/mp_math/mp_math_typing.md","filePath":"api/mp_math/mp_math_typing.md"}'),n={name:"api/mp_math/mp_math_typing.md"},o=l('

var RealNumber = int | float

var Number = RealNumber | complex

var SingleVar = TypeVar('SingleVar', bound=Number)

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

var Var = SingleVar | ArrayVar

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

var MultiSingleVarsFunc = Callable[..., SingleVar]

var MultiArraysFunc = Callable[..., ArrayVar]

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

',34),i=[o];function t(s,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",t]]);export{p as __pageData,m as default}; diff --git a/assets/api_mp_math_mp_math_typing.md.DbhZntP7.lean.js b/assets/api_mp_math_mp_math_typing.md.COrE_fd3.lean.js similarity index 73% rename from assets/api_mp_math_mp_math_typing.md.DbhZntP7.lean.js rename to assets/api_mp_math_mp_math_typing.md.COrE_fd3.lean.js index 2b5a0c5..f8e666c 100644 --- a/assets/api_mp_math_mp_math_typing.md.DbhZntP7.lean.js +++ b/assets/api_mp_math_mp_math_typing.md.COrE_fd3.lean.js @@ -1 +1 @@ -import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"api/mp_math/mp_math_typing.md","filePath":"api/mp_math/mp_math_typing.md"}'),n={name:"api/mp_math/mp_math_typing.md"},o=l("",30),i=[o];function s(t,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",s]]);export{p as __pageData,m as default}; +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"api/mp_math/mp_math_typing.md","filePath":"api/mp_math/mp_math_typing.md"}'),n={name:"api/mp_math/mp_math_typing.md"},o=l("",34),i=[o];function t(s,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",t]]);export{p as __pageData,m as default}; diff --git a/assets/api_mp_math_mp_math_typing.md.DbhZntP7.js b/assets/api_mp_math_mp_math_typing.md.DbhZntP7.js deleted file mode 100644 index 1f70e00..0000000 --- a/assets/api_mp_math_mp_math_typing.md.DbhZntP7.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"api/mp_math/mp_math_typing.md","filePath":"api/mp_math/mp_math_typing.md"}'),n={name:"api/mp_math/mp_math_typing.md"},o=l('

var RealNumber = int | float

var Number = RealNumber | complex

var Var = SingleVar | ArrayVar

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

var MultiSingleVarsFunc = Callable[..., SingleVar]

var MultiArraysFunc = Callable[..., ArrayVar]

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

',30),i=[o];function s(t,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",s]]);export{p as __pageData,m as default}; diff --git a/assets/en_api_mp_math_const.md.6yNmEodn.js b/assets/en_api_mp_math_const.md.6yNmEodn.js deleted file mode 100644 index 05197b6..0000000 --- a/assets/en_api_mp_math_const.md.6yNmEodn.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o as a}from"./chunks/framework.BV61Qrc0.js";const d=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"en/api/mp_math/const.md","filePath":"en/api/mp_math/const.md"}'),n={name:"en/api/mp_math/const.md"};function c(o,s,m,p,r,_){return a(),e("div")}const h=t(n,[["render",c]]);export{d as __pageData,h as default}; diff --git a/assets/en_api_mp_math_const.md.6yNmEodn.lean.js b/assets/en_api_mp_math_const.md.6yNmEodn.lean.js deleted file mode 100644 index 05197b6..0000000 --- a/assets/en_api_mp_math_const.md.6yNmEodn.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o as a}from"./chunks/framework.BV61Qrc0.js";const d=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"en/api/mp_math/const.md","filePath":"en/api/mp_math/const.md"}'),n={name:"en/api/mp_math/const.md"};function c(o,s,m,p,r,_){return a(),e("div")}const h=t(n,[["render",c]]);export{d as __pageData,h as default}; diff --git a/assets/en_api_mp_math_const.md.D_Flpj8t.js b/assets/en_api_mp_math_const.md.D_Flpj8t.js new file mode 100644 index 0000000..0e09b57 --- /dev/null +++ b/assets/en_api_mp_math_const.md.D_Flpj8t.js @@ -0,0 +1 @@ +import{_ as t,c as a,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"en/api/mp_math/const.md","filePath":"en/api/mp_math/const.md"}'),r={name:"en/api/mp_math/const.md"},n=o('

var EPSILON = 0.0001

var APPROX = 0.001

',4),s=[n];function c(i,_,p,l,m,d){return e(),a("div",null,s)}const P=t(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/en_api_mp_math_const.md.D_Flpj8t.lean.js b/assets/en_api_mp_math_const.md.D_Flpj8t.lean.js new file mode 100644 index 0000000..f0c92b4 --- /dev/null +++ b/assets/en_api_mp_math_const.md.D_Flpj8t.lean.js @@ -0,0 +1 @@ +import{_ as t,c as a,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"en/api/mp_math/const.md","filePath":"en/api/mp_math/const.md"}'),r={name:"en/api/mp_math/const.md"},n=o("",4),s=[n];function c(i,_,p,l,m,d){return e(),a("div",null,s)}const P=t(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/en_api_mp_math_equation.md.DyRN0jPI.js b/assets/en_api_mp_math_equation.md.CiUDCfZP.js similarity index 70% rename from assets/en_api_mp_math_equation.md.DyRN0jPI.js rename to assets/en_api_mp_math_equation.md.CiUDCfZP.js index 0020cea..45e3b0d 100644 --- a/assets/en_api_mp_math_equation.md.DyRN0jPI.js +++ b/assets/en_api_mp_math_equation.md.CiUDCfZP.js @@ -28,16 +28,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const u return result_func(*args) return high_order_partial_derivative_func else: - raise ValueError('Invalid var type')

func partial_derivative_func() -> Var

Source code
python
def partial_derivative_func(*args: Var) -> Var:
-    args_list_plus = list(args)
-    args_list_plus[var] += epsilon
-    args_list_minus = list(args)
-    args_list_minus[var] -= epsilon
-    return (func(*args_list_plus) - func(*args_list_minus)) / (2 * epsilon)

func high_order_partial_derivative_func() -> Var

Source code
python
def high_order_partial_derivative_func(*args: Var) -> Var:
-    result_func = func
-    for v in var:
-        result_func = get_partial_derivative_func(result_func, v, epsilon)
-    return result_func(*args)

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

Description: 曲线方程。

Arguments:

Source code
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+        raise ValueError('Invalid var type')

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

Description: 曲线方程。

Arguments:

Source code
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
     """
         曲线方程。
         Args:
@@ -59,4 +50,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const u
     if len(t) == 1:
         return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
     else:
-        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
`,23),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{u as __pageData,y as default}; + return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])`,19),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{u as __pageData,y as default}; diff --git a/assets/en_api_mp_math_equation.md.DyRN0jPI.lean.js b/assets/en_api_mp_math_equation.md.CiUDCfZP.lean.js similarity index 86% rename from assets/en_api_mp_math_equation.md.DyRN0jPI.lean.js rename to assets/en_api_mp_math_equation.md.CiUDCfZP.lean.js index 78e1a43..2a24e62 100644 --- a/assets/en_api_mp_math_equation.md.DyRN0jPI.lean.js +++ b/assets/en_api_mp_math_equation.md.CiUDCfZP.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"en/api/mp_math/equation.md","filePath":"en/api/mp_math/equation.md"}'),l={name:"en/api/mp_math/equation.md"},t=n("",23),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{u as __pageData,y as default}; +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"en/api/mp_math/equation.md","filePath":"en/api/mp_math/equation.md"}'),l={name:"en/api/mp_math/equation.md"},t=n("",19),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{u as __pageData,y as default}; diff --git a/assets/en_api_mp_math_mp_math_typing.md.CyXXFdS4.js b/assets/en_api_mp_math_mp_math_typing.md.CyXXFdS4.js new file mode 100644 index 0000000..e2c985d --- /dev/null +++ b/assets/en_api_mp_math_mp_math_typing.md.CyXXFdS4.js @@ -0,0 +1 @@ +import{_ as r,c as a,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"en/api/mp_math/mp_math_typing.md","filePath":"en/api/mp_math/mp_math_typing.md"}'),n={name:"en/api/mp_math/mp_math_typing.md"},o=l('

var RealNumber = int | float

var Number = RealNumber | complex

var SingleVar = TypeVar('SingleVar', bound=Number)

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

var Var = SingleVar | ArrayVar

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

var MultiSingleVarsFunc = Callable[..., SingleVar]

var MultiArraysFunc = Callable[..., ArrayVar]

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

',34),i=[o];function t(s,c,u,g,p,v){return e(),a("div",null,i)}const h=r(n,[["render",t]]);export{y as __pageData,h as default}; diff --git a/assets/en_api_mp_math_mp_math_typing.md.CyXXFdS4.lean.js b/assets/en_api_mp_math_mp_math_typing.md.CyXXFdS4.lean.js new file mode 100644 index 0000000..ff586e8 --- /dev/null +++ b/assets/en_api_mp_math_mp_math_typing.md.CyXXFdS4.lean.js @@ -0,0 +1 @@ +import{_ as r,c as a,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"en/api/mp_math/mp_math_typing.md","filePath":"en/api/mp_math/mp_math_typing.md"}'),n={name:"en/api/mp_math/mp_math_typing.md"},o=l("",34),i=[o];function t(s,c,u,g,p,v){return e(),a("div",null,i)}const h=r(n,[["render",t]]);export{y as __pageData,h as default}; diff --git a/assets/en_api_mp_math_mp_math_typing.md.Dz_z86ZN.js b/assets/en_api_mp_math_mp_math_typing.md.Dz_z86ZN.js deleted file mode 100644 index 8efdb3e..0000000 --- a/assets/en_api_mp_math_mp_math_typing.md.Dz_z86ZN.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const h=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"en/api/mp_math/mp_math_typing.md","filePath":"en/api/mp_math/mp_math_typing.md"}'),n={name:"en/api/mp_math/mp_math_typing.md"},i=l('

var RealNumber = int | float

var Number = RealNumber | complex

var Var = SingleVar | ArrayVar

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

var MultiSingleVarsFunc = Callable[..., SingleVar]

var MultiArraysFunc = Callable[..., ArrayVar]

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

',30),o=[i];function s(t,c,u,g,p,v){return e(),r("div",null,o)}const y=a(n,[["render",s]]);export{h as __pageData,y as default}; diff --git a/assets/en_api_mp_math_mp_math_typing.md.Dz_z86ZN.lean.js b/assets/en_api_mp_math_mp_math_typing.md.Dz_z86ZN.lean.js deleted file mode 100644 index ab25bf0..0000000 --- a/assets/en_api_mp_math_mp_math_typing.md.Dz_z86ZN.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const h=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"en/api/mp_math/mp_math_typing.md","filePath":"en/api/mp_math/mp_math_typing.md"}'),n={name:"en/api/mp_math/mp_math_typing.md"},i=l("",30),o=[i];function s(t,c,u,g,p,v){return e(),r("div",null,o)}const y=a(n,[["render",s]]);export{h as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_const.md.CflutYeA.js b/assets/ja_api_mp_math_const.md.CflutYeA.js deleted file mode 100644 index 9244728..0000000 --- a/assets/ja_api_mp_math_const.md.CflutYeA.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as a,o as e}from"./chunks/framework.BV61Qrc0.js";const d=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"ja/api/mp_math/const.md","filePath":"ja/api/mp_math/const.md"}'),c={name:"ja/api/mp_math/const.md"};function o(s,m,n,p,r,_){return e(),a("div")}const h=t(c,[["render",o]]);export{d as __pageData,h as default}; diff --git a/assets/ja_api_mp_math_const.md.CflutYeA.lean.js b/assets/ja_api_mp_math_const.md.CflutYeA.lean.js deleted file mode 100644 index 9244728..0000000 --- a/assets/ja_api_mp_math_const.md.CflutYeA.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as a,o as e}from"./chunks/framework.BV61Qrc0.js";const d=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"ja/api/mp_math/const.md","filePath":"ja/api/mp_math/const.md"}'),c={name:"ja/api/mp_math/const.md"};function o(s,m,n,p,r,_){return e(),a("div")}const h=t(c,[["render",o]]);export{d as __pageData,h as default}; diff --git a/assets/ja_api_mp_math_const.md.CyaIJkFx.js b/assets/ja_api_mp_math_const.md.CyaIJkFx.js new file mode 100644 index 0000000..9af4692 --- /dev/null +++ b/assets/ja_api_mp_math_const.md.CyaIJkFx.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"ja/api/mp_math/const.md","filePath":"ja/api/mp_math/const.md"}'),r={name:"ja/api/mp_math/const.md"},s=o('

var EPSILON = 0.0001

var APPROX = 0.001

',4),n=[s];function c(_,i,l,m,p,d){return e(),t("div",null,n)}const P=a(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/ja_api_mp_math_const.md.CyaIJkFx.lean.js b/assets/ja_api_mp_math_const.md.CyaIJkFx.lean.js new file mode 100644 index 0000000..50ff41e --- /dev/null +++ b/assets/ja_api_mp_math_const.md.CyaIJkFx.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"ja/api/mp_math/const.md","filePath":"ja/api/mp_math/const.md"}'),r={name:"ja/api/mp_math/const.md"},s=o("",4),n=[s];function c(_,i,l,m,p,d){return e(),t("div",null,n)}const P=a(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/ja_api_mp_math_equation.md.3a6umjdP.js b/assets/ja_api_mp_math_equation.md.O5E3UAo5.js similarity index 70% rename from assets/ja_api_mp_math_equation.md.3a6umjdP.js rename to assets/ja_api_mp_math_equation.md.O5E3UAo5.js index 0f8cb26..ccfe044 100644 --- a/assets/ja_api_mp_math_equation.md.3a6umjdP.js +++ b/assets/ja_api_mp_math_equation.md.O5E3UAo5.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"ja/api/mp_math/equation.md","filePath":"ja/api/mp_math/equation.md"}'),l={name:"ja/api/mp_math/equation.md"},t=n(`

func get_partial_derivative_func(func: MultiVarsFunc = EPSILON) -> MultiVarsFunc

説明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

引数:

戻り値: 偏导函数

例外:

ソースコード
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"ja/api/mp_math/equation.md","filePath":"ja/api/mp_math/equation.md"}'),l={name:"ja/api/mp_math/equation.md"},t=n(`

func get_partial_derivative_func(func: MultiVarsFunc = EPSILON) -> MultiVarsFunc

説明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

引数:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

戻り値: 偏导函数

例外:

  • ValueError 无效变量类型
ソースコード
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
     """
     求N元函数一阶偏导函数。这玩意不太稳定,慎用。
     Args:
@@ -28,16 +28,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y
             return result_func(*args)
         return high_order_partial_derivative_func
     else:
-        raise ValueError('Invalid var type')

func partial_derivative_func() -> Var

ソースコード
python
def partial_derivative_func(*args: Var) -> Var:
-    args_list_plus = list(args)
-    args_list_plus[var] += epsilon
-    args_list_minus = list(args)
-    args_list_minus[var] -= epsilon
-    return (func(*args_list_plus) - func(*args_list_minus)) / (2 * epsilon)

func high_order_partial_derivative_func() -> Var

ソースコード
python
def high_order_partial_derivative_func(*args: Var) -> Var:
-    result_func = func
-    for v in var:
-        result_func = get_partial_derivative_func(result_func, v, epsilon)
-    return result_func(*args)

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

引数:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
ソースコード
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+        raise ValueError('Invalid var type')

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

引数:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
ソースコード
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
     """
         曲线方程。
         Args:
@@ -59,4 +50,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y
     if len(t) == 1:
         return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
     else:
-        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
`,23),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const u=s(l,[["render",p]]);export{y as __pageData,u as default}; + return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
`,19),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{u as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_equation.md.3a6umjdP.lean.js b/assets/ja_api_mp_math_equation.md.O5E3UAo5.lean.js similarity index 55% rename from assets/ja_api_mp_math_equation.md.3a6umjdP.lean.js rename to assets/ja_api_mp_math_equation.md.O5E3UAo5.lean.js index 83b725c..e36dd60 100644 --- a/assets/ja_api_mp_math_equation.md.3a6umjdP.lean.js +++ b/assets/ja_api_mp_math_equation.md.O5E3UAo5.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"ja/api/mp_math/equation.md","filePath":"ja/api/mp_math/equation.md"}'),l={name:"ja/api/mp_math/equation.md"},t=n("",23),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const u=s(l,[["render",p]]);export{y as __pageData,u as default}; +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"ja/api/mp_math/equation.md","filePath":"ja/api/mp_math/equation.md"}'),l={name:"ja/api/mp_math/equation.md"},t=n("",19),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{u as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_mp_math_typing.md.Bl5kyhpI.js b/assets/ja_api_mp_math_mp_math_typing.md.Bl5kyhpI.js new file mode 100644 index 0000000..d1e13d1 --- /dev/null +++ b/assets/ja_api_mp_math_mp_math_typing.md.Bl5kyhpI.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"ja/api/mp_math/mp_math_typing.md","filePath":"ja/api/mp_math/mp_math_typing.md"}'),n={name:"ja/api/mp_math/mp_math_typing.md"},o=l('

var RealNumber = int | float

var Number = RealNumber | complex

var SingleVar = TypeVar('SingleVar', bound=Number)

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

var Var = SingleVar | ArrayVar

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

var MultiSingleVarsFunc = Callable[..., SingleVar]

var MultiArraysFunc = Callable[..., ArrayVar]

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

',34),i=[o];function t(s,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",t]]);export{p as __pageData,m as default}; diff --git a/assets/ja_api_mp_math_mp_math_typing.md.Y_g_snlN.lean.js b/assets/ja_api_mp_math_mp_math_typing.md.Bl5kyhpI.lean.js similarity index 64% rename from assets/ja_api_mp_math_mp_math_typing.md.Y_g_snlN.lean.js rename to assets/ja_api_mp_math_mp_math_typing.md.Bl5kyhpI.lean.js index 6b94513..3825ba5 100644 --- a/assets/ja_api_mp_math_mp_math_typing.md.Y_g_snlN.lean.js +++ b/assets/ja_api_mp_math_mp_math_typing.md.Bl5kyhpI.lean.js @@ -1 +1 @@ -import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"ja/api/mp_math/mp_math_typing.md","filePath":"ja/api/mp_math/mp_math_typing.md"}'),n={name:"ja/api/mp_math/mp_math_typing.md"},o=l("",30),i=[o];function s(t,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",s]]);export{p as __pageData,m as default}; +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"ja/api/mp_math/mp_math_typing.md","filePath":"ja/api/mp_math/mp_math_typing.md"}'),n={name:"ja/api/mp_math/mp_math_typing.md"},o=l("",34),i=[o];function t(s,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",t]]);export{p as __pageData,m as default}; diff --git a/assets/ja_api_mp_math_mp_math_typing.md.Y_g_snlN.js b/assets/ja_api_mp_math_mp_math_typing.md.Y_g_snlN.js deleted file mode 100644 index 1a632d7..0000000 --- a/assets/ja_api_mp_math_mp_math_typing.md.Y_g_snlN.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"ja/api/mp_math/mp_math_typing.md","filePath":"ja/api/mp_math/mp_math_typing.md"}'),n={name:"ja/api/mp_math/mp_math_typing.md"},o=l('

var RealNumber = int | float

var Number = RealNumber | complex

var Var = SingleVar | ArrayVar

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

var MultiSingleVarsFunc = Callable[..., SingleVar]

var MultiArraysFunc = Callable[..., ArrayVar]

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

',30),i=[o];function s(t,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",s]]);export{p as __pageData,m as default}; diff --git a/assets/zht_api_mp_math_const.md.B8uQOIr_.js b/assets/zht_api_mp_math_const.md.B8uQOIr_.js new file mode 100644 index 0000000..26995b2 --- /dev/null +++ b/assets/zht_api_mp_math_const.md.B8uQOIr_.js @@ -0,0 +1 @@ +import{_ as t,c as a,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"zht/api/mp_math/const.md","filePath":"zht/api/mp_math/const.md"}'),r={name:"zht/api/mp_math/const.md"},s=o('

var EPSILON = 0.0001

var APPROX = 0.001

',4),n=[s];function c(_,i,l,m,p,h){return e(),a("div",null,n)}const P=t(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/zht_api_mp_math_const.md.B8uQOIr_.lean.js b/assets/zht_api_mp_math_const.md.B8uQOIr_.lean.js new file mode 100644 index 0000000..bd69dc7 --- /dev/null +++ b/assets/zht_api_mp_math_const.md.B8uQOIr_.lean.js @@ -0,0 +1 @@ +import{_ as t,c as a,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"zht/api/mp_math/const.md","filePath":"zht/api/mp_math/const.md"}'),r={name:"zht/api/mp_math/const.md"},s=o("",4),n=[s];function c(_,i,l,m,p,h){return e(),a("div",null,n)}const P=t(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/zht_api_mp_math_const.md.CIhADrI2.js b/assets/zht_api_mp_math_const.md.CIhADrI2.js deleted file mode 100644 index 8ee1750..0000000 --- a/assets/zht_api_mp_math_const.md.CIhADrI2.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as a,o as e}from"./chunks/framework.BV61Qrc0.js";const h=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"zht/api/mp_math/const.md","filePath":"zht/api/mp_math/const.md"}'),c={name:"zht/api/mp_math/const.md"};function o(s,m,n,p,r,_){return e(),a("div")}const d=t(c,[["render",o]]);export{h as __pageData,d as default}; diff --git a/assets/zht_api_mp_math_const.md.CIhADrI2.lean.js b/assets/zht_api_mp_math_const.md.CIhADrI2.lean.js deleted file mode 100644 index 8ee1750..0000000 --- a/assets/zht_api_mp_math_const.md.CIhADrI2.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as a,o as e}from"./chunks/framework.BV61Qrc0.js";const h=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"zht/api/mp_math/const.md","filePath":"zht/api/mp_math/const.md"}'),c={name:"zht/api/mp_math/const.md"};function o(s,m,n,p,r,_){return e(),a("div")}const d=t(c,[["render",o]]);export{h as __pageData,d as default}; diff --git a/assets/zht_api_mp_math_equation.md.2k-eEs3U.js b/assets/zht_api_mp_math_equation.md.CXSb9fP6.js similarity index 70% rename from assets/zht_api_mp_math_equation.md.2k-eEs3U.js rename to assets/zht_api_mp_math_equation.md.CXSb9fP6.js index 6f83f58..22dae6b 100644 --- a/assets/zht_api_mp_math_equation.md.2k-eEs3U.js +++ b/assets/zht_api_mp_math_equation.md.CXSb9fP6.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"zht/api/mp_math/equation.md","filePath":"zht/api/mp_math/equation.md"}'),l={name:"zht/api/mp_math/equation.md"},t=n(`

func get_partial_derivative_func(func: MultiVarsFunc = EPSILON) -> MultiVarsFunc

説明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

變數説明:

返回: 偏导函数

抛出:

源碼
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"zht/api/mp_math/equation.md","filePath":"zht/api/mp_math/equation.md"}'),l={name:"zht/api/mp_math/equation.md"},t=n(`

func get_partial_derivative_func(func: MultiVarsFunc = EPSILON) -> MultiVarsFunc

説明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

變數説明:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

返回: 偏导函数

抛出:

  • ValueError 无效变量类型
源碼
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
     """
     求N元函数一阶偏导函数。这玩意不太稳定,慎用。
     Args:
@@ -28,16 +28,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y
             return result_func(*args)
         return high_order_partial_derivative_func
     else:
-        raise ValueError('Invalid var type')

func partial_derivative_func() -> Var

源碼
python
def partial_derivative_func(*args: Var) -> Var:
-    args_list_plus = list(args)
-    args_list_plus[var] += epsilon
-    args_list_minus = list(args)
-    args_list_minus[var] -= epsilon
-    return (func(*args_list_plus) - func(*args_list_minus)) / (2 * epsilon)

func high_order_partial_derivative_func() -> Var

源碼
python
def high_order_partial_derivative_func(*args: Var) -> Var:
-    result_func = func
-    for v in var:
-        result_func = get_partial_derivative_func(result_func, v, epsilon)
-    return result_func(*args)

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

變數説明:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
源碼
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+        raise ValueError('Invalid var type')

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

變數説明:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
源碼
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
     """
         曲线方程。
         Args:
@@ -59,4 +50,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y
     if len(t) == 1:
         return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
     else:
-        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
`,23),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const u=s(l,[["render",p]]);export{y as __pageData,u as default}; + return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
`,19),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{u as __pageData,y as default}; diff --git a/assets/zht_api_mp_math_equation.md.2k-eEs3U.lean.js b/assets/zht_api_mp_math_equation.md.CXSb9fP6.lean.js similarity index 54% rename from assets/zht_api_mp_math_equation.md.2k-eEs3U.lean.js rename to assets/zht_api_mp_math_equation.md.CXSb9fP6.lean.js index 7a9c189..a050cc7 100644 --- a/assets/zht_api_mp_math_equation.md.2k-eEs3U.lean.js +++ b/assets/zht_api_mp_math_equation.md.CXSb9fP6.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"zht/api/mp_math/equation.md","filePath":"zht/api/mp_math/equation.md"}'),l={name:"zht/api/mp_math/equation.md"},t=n("",23),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const u=s(l,[["render",p]]);export{y as __pageData,u as default}; +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"zht/api/mp_math/equation.md","filePath":"zht/api/mp_math/equation.md"}'),l={name:"zht/api/mp_math/equation.md"},t=n("",19),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{u as __pageData,y as default}; diff --git a/assets/zht_api_mp_math_mp_math_typing.md.Bo_3D1bF.js b/assets/zht_api_mp_math_mp_math_typing.md.Bo_3D1bF.js deleted file mode 100644 index 79c93fa..0000000 --- a/assets/zht_api_mp_math_mp_math_typing.md.Bo_3D1bF.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"zht/api/mp_math/mp_math_typing.md","filePath":"zht/api/mp_math/mp_math_typing.md"}'),n={name:"zht/api/mp_math/mp_math_typing.md"},o=l('

var RealNumber = int | float

var Number = RealNumber | complex

var Var = SingleVar | ArrayVar

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

var MultiSingleVarsFunc = Callable[..., SingleVar]

var MultiArraysFunc = Callable[..., ArrayVar]

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

',30),i=[o];function s(t,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",s]]);export{p as __pageData,m as default}; diff --git a/assets/zht_api_mp_math_mp_math_typing.md.DLx0IibM.js b/assets/zht_api_mp_math_mp_math_typing.md.DLx0IibM.js new file mode 100644 index 0000000..0bee4c3 --- /dev/null +++ b/assets/zht_api_mp_math_mp_math_typing.md.DLx0IibM.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"zht/api/mp_math/mp_math_typing.md","filePath":"zht/api/mp_math/mp_math_typing.md"}'),n={name:"zht/api/mp_math/mp_math_typing.md"},o=l('

var RealNumber = int | float

var Number = RealNumber | complex

var SingleVar = TypeVar('SingleVar', bound=Number)

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

var Var = SingleVar | ArrayVar

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

var MultiSingleVarsFunc = Callable[..., SingleVar]

var MultiArraysFunc = Callable[..., ArrayVar]

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

',34),i=[o];function t(s,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",t]]);export{p as __pageData,m as default}; diff --git a/assets/zht_api_mp_math_mp_math_typing.md.Bo_3D1bF.lean.js b/assets/zht_api_mp_math_mp_math_typing.md.DLx0IibM.lean.js similarity index 64% rename from assets/zht_api_mp_math_mp_math_typing.md.Bo_3D1bF.lean.js rename to assets/zht_api_mp_math_mp_math_typing.md.DLx0IibM.lean.js index f9359ab..d10717e 100644 --- a/assets/zht_api_mp_math_mp_math_typing.md.Bo_3D1bF.lean.js +++ b/assets/zht_api_mp_math_mp_math_typing.md.DLx0IibM.lean.js @@ -1 +1 @@ -import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"zht/api/mp_math/mp_math_typing.md","filePath":"zht/api/mp_math/mp_math_typing.md"}'),n={name:"zht/api/mp_math/mp_math_typing.md"},o=l("",30),i=[o];function s(t,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",s]]);export{p as __pageData,m as default}; +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"zht/api/mp_math/mp_math_typing.md","filePath":"zht/api/mp_math/mp_math_typing.md"}'),n={name:"zht/api/mp_math/mp_math_typing.md"},o=l("",34),i=[o];function t(s,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",t]]);export{p as __pageData,m as default}; diff --git a/en/api/index.html b/en/api/index.html index 3c466a3..4194fe9 100644 --- a/en/api/index.html +++ b/en/api/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/en/api/mp_math/angle.html b/en/api/mp_math/angle.html index d9e2bf5..7d18f38 100644 --- a/en/api/mp_math/angle.html +++ b/en/api/mp_math/angle.html @@ -116,7 +116,7 @@ if isinstance(other, AnyAngle): return self.radian / other.radian return AnyAngle(self.radian / other, is_radian=True) - + \ No newline at end of file diff --git a/en/api/mp_math/const.html b/en/api/mp_math/const.html index 4400dc3..531b388 100644 --- a/en/api/mp_math/const.html +++ b/en/api/mp_math/const.html @@ -12,13 +12,13 @@ - + -
Skip to content
- +
Skip to content

var EPSILON = 0.0001

  • Description: ε

var APPROX = 0.001

  • Description: 约等于误差
+ \ No newline at end of file diff --git a/en/api/mp_math/equation.html b/en/api/mp_math/equation.html index b100a44..ecad321 100644 --- a/en/api/mp_math/equation.html +++ b/en/api/mp_math/equation.html @@ -12,7 +12,7 @@ - + @@ -47,16 +47,7 @@ return result_func(*args) return high_order_partial_derivative_func else: - raise ValueError('Invalid var type')

func partial_derivative_func() -> Var

Source code
python
def partial_derivative_func(*args: Var) -> Var:
-    args_list_plus = list(args)
-    args_list_plus[var] += epsilon
-    args_list_minus = list(args)
-    args_list_minus[var] -= epsilon
-    return (func(*args_list_plus) - func(*args_list_minus)) / (2 * epsilon)

func high_order_partial_derivative_func() -> Var

Source code
python
def high_order_partial_derivative_func(*args: Var) -> Var:
-    result_func = func
-    for v in var:
-        result_func = get_partial_derivative_func(result_func, v, epsilon)
-    return result_func(*args)

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

Description: 曲线方程。

Arguments:

Source code
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+        raise ValueError('Invalid var type')

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

Description: 曲线方程。

Arguments:

Source code
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
     """
         曲线方程。
         Args:
@@ -79,7 +70,7 @@
         return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
     else:
         return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
- + \ No newline at end of file diff --git a/en/api/mp_math/index.html b/en/api/mp_math/index.html index 2b30a58..18a2dd4 100644 --- a/en/api/mp_math/index.html +++ b/en/api/mp_math/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/en/api/mp_math/line.html b/en/api/mp_math/line.html index 8181fd5..a371576 100644 --- a/en/api/mp_math/line.html +++ b/en/api/mp_math/line.html @@ -195,7 +195,7 @@ """ return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction) - + \ No newline at end of file diff --git a/en/api/mp_math/mp_math_typing.html b/en/api/mp_math/mp_math_typing.html index 841b427..2c2424b 100644 --- a/en/api/mp_math/mp_math_typing.html +++ b/en/api/mp_math/mp_math_typing.html @@ -12,13 +12,13 @@ - + -
Skip to content

var RealNumber = int | float

  • Type: TypeAlias

  • Description: 实数

var Number = RealNumber | complex

  • Type: TypeAlias

  • Description: 数

var Var = SingleVar | ArrayVar

  • Type: TypeAlias

  • Description: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • Type: TypeAlias

  • Description: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • Type: TypeAlias

  • Description: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • Type: TypeAlias

  • Description: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • Type: TypeAlias

  • Description: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • Type: TypeAlias

  • Description: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • Type: TypeAlias

  • Description: 多元函数

- +
Skip to content

var RealNumber = int | float

  • Type: TypeAlias

  • Description: 实数

var Number = RealNumber | complex

  • Type: TypeAlias

  • Description: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • Description: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • Description: 数组变量

var Var = SingleVar | ArrayVar

  • Type: TypeAlias

  • Description: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • Type: TypeAlias

  • Description: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • Type: TypeAlias

  • Description: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • Type: TypeAlias

  • Description: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • Type: TypeAlias

  • Description: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • Type: TypeAlias

  • Description: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • Type: TypeAlias

  • Description: 多元函数

+ \ No newline at end of file diff --git a/en/api/mp_math/plane.html b/en/api/mp_math/plane.html index 1a80af5..180d41e 100644 --- a/en/api/mp_math/plane.html +++ b/en/api/mp_math/plane.html @@ -213,7 +213,7 @@ raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

Source code
python
def __eq__(self, other) -> bool:
     return self.approx(other)

method __rand__(self, other: Line3) -> Point3

Source code
python
def __rand__(self, other: 'Line3') -> 'Point3':
     return self.cal_intersection_point3(other)
- + \ No newline at end of file diff --git a/en/api/mp_math/point.html b/en/api/mp_math/point.html index ee85396..9d3d98f 100644 --- a/en/api/mp_math/point.html +++ b/en/api/mp_math/point.html @@ -68,7 +68,7 @@ """ from .vector import Vector3 return Vector3(self.x - other.x, self.y - other.y, self.z - other.z) - + \ No newline at end of file diff --git a/en/api/mp_math/segment.html b/en/api/mp_math/segment.html index c9238a4..dcdcd6c 100644 --- a/en/api/mp_math/segment.html +++ b/en/api/mp_math/segment.html @@ -31,7 +31,7 @@ self.length = self.direction.length '中心点' self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2) - + \ No newline at end of file diff --git a/en/api/mp_math/utils.html b/en/api/mp_math/utils.html index ced8606..13e7990 100644 --- a/en/api/mp_math/utils.html +++ b/en/api/mp_math/utils.html @@ -81,7 +81,7 @@ self.raise_type_error(other)

method raise_type_error(self, other)

Source code
python
def raise_type_error(self, other):
     raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

Source code
python
def __ne__(self, other):
     return not self.__eq__(other)
- + \ No newline at end of file diff --git a/en/api/mp_math/vector.html b/en/api/mp_math/vector.html index 5dfce0d..ec1fbfa 100644 --- a/en/api/mp_math/vector.html +++ b/en/api/mp_math/vector.html @@ -204,7 +204,7 @@ return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

Source code
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
     return Vector3(self.x / other, self.y / other, self.z / other)

method - self

Source code
python
def __neg__(self):
     return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

var x_axis = Vector3(1, 0, 0)

var y_axis = Vector3(0, 1, 0)

var z_axis = Vector3(0, 0, 1)

- + \ No newline at end of file diff --git a/en/api/particle/index.html b/en/api/particle/index.html index 4df5090..d312d8e 100644 --- a/en/api/particle/index.html +++ b/en/api/particle/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/en/api/presets/index.html b/en/api/presets/index.html index ed4f173..e22f674 100644 --- a/en/api/presets/index.html +++ b/en/api/presets/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/en/api/presets/model/index.html b/en/api/presets/model/index.html index 0bab3f9..cca9a17 100644 --- a/en/api/presets/model/index.html +++ b/en/api/presets/model/index.html @@ -35,7 +35,7 @@ y_array = radius * np.sin(phi_list) * np.sin(theta_list) z_array = radius * np.cos(phi_list) return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)] - + \ No newline at end of file diff --git a/guide/index.html b/guide/index.html index 59f9480..2d11489 100644 --- a/guide/index.html +++ b/guide/index.html @@ -18,7 +18,7 @@
Skip to content

开始不了一点

- + \ No newline at end of file diff --git a/hashmap.json b/hashmap.json index b6aea7b..873cf17 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"api-ex.md":"DOsKaL8H","api_index.md":"BvazTqTB","api_mp_math_angle.md":"B8w0LP6o","api_mp_math_const.md":"BzOZuyZq","api_mp_math_equation.md":"Ck19tFkF","api_mp_math_index.md":"4P0hk6gb","api_mp_math_line.md":"B1jAKPr1","api_mp_math_mp_math_typing.md":"DbhZntP7","api_mp_math_plane.md":"DLB54RNP","api_mp_math_point.md":"BwXaSbuz","api_mp_math_segment.md":"C6i78ST1","api_mp_math_utils.md":"Bkx3QJ6f","api_mp_math_vector.md":"Efti6kdT","api_particle_index.md":"BRCSxC3e","api_presets_index.md":"Dl6Ss91J","api_presets_model_index.md":"DY6YMRqf","en_api_index.md":"Bgu-LD1B","en_api_mp_math_angle.md":"DmK_A9xI","en_api_mp_math_const.md":"6yNmEodn","en_api_mp_math_equation.md":"DyRN0jPI","en_api_mp_math_index.md":"DrjDUYBY","en_api_mp_math_line.md":"BBlzflWh","en_api_mp_math_mp_math_typing.md":"Dz_z86ZN","en_api_mp_math_plane.md":"cxytQLD4","en_api_mp_math_point.md":"CXQGh5Zt","en_api_mp_math_segment.md":"CxreVgqR","en_api_mp_math_utils.md":"aavLLFMy","en_api_mp_math_vector.md":"BvKJEw7_","en_api_particle_index.md":"CmC1QX5o","en_api_presets_index.md":"CZ5hl_7D","en_api_presets_model_index.md":"DBfUZUBC","guide_index.md":"BE2yloik","index.md":"BE1qChTt","ja_api_index.md":"4BnflFIm","ja_api_mp_math_angle.md":"DxBe_g0o","ja_api_mp_math_const.md":"CflutYeA","ja_api_mp_math_equation.md":"3a6umjdP","ja_api_mp_math_index.md":"CSAMHYsB","ja_api_mp_math_line.md":"CMfQT6TH","ja_api_mp_math_mp_math_typing.md":"Y_g_snlN","ja_api_mp_math_plane.md":"Cm4a8eqF","ja_api_mp_math_point.md":"CQAIjHfb","ja_api_mp_math_segment.md":"D0U5bMSu","ja_api_mp_math_utils.md":"CXGqGLUs","ja_api_mp_math_vector.md":"C9TtayJk","ja_api_particle_index.md":"E2YnH7EN","ja_api_presets_index.md":"ATGcHt9d","ja_api_presets_model_index.md":"DAVK1sDI","md-ex.md":"BX0WqOqv","zht_api_index.md":"Dq4XPUKZ","zht_api_mp_math_angle.md":"_4N19GGe","zht_api_mp_math_const.md":"CIhADrI2","zht_api_mp_math_equation.md":"2k-eEs3U","zht_api_mp_math_index.md":"D09y2ubg","zht_api_mp_math_line.md":"4ncoPmkZ","zht_api_mp_math_mp_math_typing.md":"Bo_3D1bF","zht_api_mp_math_plane.md":"Buk-SLcC","zht_api_mp_math_point.md":"Bb3tyGv-","zht_api_mp_math_segment.md":"U_lS4vUA","zht_api_mp_math_utils.md":"ig9jQkoA","zht_api_mp_math_vector.md":"CDyAXuJb","zht_api_particle_index.md":"kAm9VAEw","zht_api_presets_index.md":"BmouaEaT","zht_api_presets_model_index.md":"CrdAyyCM"} +{"api-ex.md":"DOsKaL8H","api_index.md":"BvazTqTB","api_mp_math_angle.md":"B8w0LP6o","api_mp_math_const.md":"D9zs7__H","api_mp_math_equation.md":"BcXDoPv-","api_mp_math_index.md":"4P0hk6gb","api_mp_math_line.md":"B1jAKPr1","api_mp_math_mp_math_typing.md":"COrE_fd3","api_mp_math_plane.md":"DLB54RNP","api_mp_math_point.md":"BwXaSbuz","api_mp_math_segment.md":"C6i78ST1","api_mp_math_utils.md":"Bkx3QJ6f","api_mp_math_vector.md":"Efti6kdT","api_particle_index.md":"BRCSxC3e","api_presets_index.md":"Dl6Ss91J","api_presets_model_index.md":"DY6YMRqf","en_api_index.md":"Bgu-LD1B","en_api_mp_math_angle.md":"DmK_A9xI","en_api_mp_math_const.md":"D_Flpj8t","en_api_mp_math_equation.md":"CiUDCfZP","en_api_mp_math_index.md":"DrjDUYBY","en_api_mp_math_line.md":"BBlzflWh","en_api_mp_math_mp_math_typing.md":"CyXXFdS4","en_api_mp_math_plane.md":"cxytQLD4","en_api_mp_math_point.md":"CXQGh5Zt","en_api_mp_math_segment.md":"CxreVgqR","en_api_mp_math_utils.md":"aavLLFMy","en_api_mp_math_vector.md":"BvKJEw7_","en_api_particle_index.md":"CmC1QX5o","en_api_presets_index.md":"CZ5hl_7D","en_api_presets_model_index.md":"DBfUZUBC","guide_index.md":"BE2yloik","index.md":"BE1qChTt","ja_api_index.md":"4BnflFIm","ja_api_mp_math_angle.md":"DxBe_g0o","ja_api_mp_math_const.md":"CyaIJkFx","ja_api_mp_math_equation.md":"O5E3UAo5","ja_api_mp_math_index.md":"CSAMHYsB","ja_api_mp_math_line.md":"CMfQT6TH","ja_api_mp_math_mp_math_typing.md":"Bl5kyhpI","ja_api_mp_math_plane.md":"Cm4a8eqF","ja_api_mp_math_point.md":"CQAIjHfb","ja_api_mp_math_segment.md":"D0U5bMSu","ja_api_mp_math_utils.md":"CXGqGLUs","ja_api_mp_math_vector.md":"C9TtayJk","ja_api_particle_index.md":"E2YnH7EN","ja_api_presets_index.md":"ATGcHt9d","ja_api_presets_model_index.md":"DAVK1sDI","md-ex.md":"BX0WqOqv","zht_api_index.md":"Dq4XPUKZ","zht_api_mp_math_angle.md":"_4N19GGe","zht_api_mp_math_const.md":"B8uQOIr_","zht_api_mp_math_equation.md":"CXSb9fP6","zht_api_mp_math_index.md":"D09y2ubg","zht_api_mp_math_line.md":"4ncoPmkZ","zht_api_mp_math_mp_math_typing.md":"DLx0IibM","zht_api_mp_math_plane.md":"Buk-SLcC","zht_api_mp_math_point.md":"Bb3tyGv-","zht_api_mp_math_segment.md":"U_lS4vUA","zht_api_mp_math_utils.md":"ig9jQkoA","zht_api_mp_math_vector.md":"CDyAXuJb","zht_api_particle_index.md":"kAm9VAEw","zht_api_presets_index.md":"BmouaEaT","zht_api_presets_model_index.md":"CrdAyyCM"} diff --git a/index.html b/index.html index 6dc944f..fc19e7a 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@
Skip to content

MBCP docs

More basic change particle

用于几何运算和粒子制作的库

- + \ No newline at end of file diff --git a/ja/api/index.html b/ja/api/index.html index d44c41d..af2b052 100644 --- a/ja/api/index.html +++ b/ja/api/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/ja/api/mp_math/angle.html b/ja/api/mp_math/angle.html index 0170181..7416d08 100644 --- a/ja/api/mp_math/angle.html +++ b/ja/api/mp_math/angle.html @@ -116,7 +116,7 @@ if isinstance(other, AnyAngle): return self.radian / other.radian return AnyAngle(self.radian / other, is_radian=True) - + \ No newline at end of file diff --git a/ja/api/mp_math/const.html b/ja/api/mp_math/const.html index 0493fd1..fe1e9b1 100644 --- a/ja/api/mp_math/const.html +++ b/ja/api/mp_math/const.html @@ -12,13 +12,13 @@ - + -
Skip to content
- +
Skip to content

var EPSILON = 0.0001

  • 説明: ε

var APPROX = 0.001

  • 説明: 约等于误差
+ \ No newline at end of file diff --git a/ja/api/mp_math/equation.html b/ja/api/mp_math/equation.html index 1c3041a..f6b7965 100644 --- a/ja/api/mp_math/equation.html +++ b/ja/api/mp_math/equation.html @@ -12,7 +12,7 @@ - + @@ -47,16 +47,7 @@ return result_func(*args) return high_order_partial_derivative_func else: - raise ValueError('Invalid var type')

func partial_derivative_func() -> Var

ソースコード
python
def partial_derivative_func(*args: Var) -> Var:
-    args_list_plus = list(args)
-    args_list_plus[var] += epsilon
-    args_list_minus = list(args)
-    args_list_minus[var] -= epsilon
-    return (func(*args_list_plus) - func(*args_list_minus)) / (2 * epsilon)

func high_order_partial_derivative_func() -> Var

ソースコード
python
def high_order_partial_derivative_func(*args: Var) -> Var:
-    result_func = func
-    for v in var:
-        result_func = get_partial_derivative_func(result_func, v, epsilon)
-    return result_func(*args)

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

引数:

ソースコード
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+        raise ValueError('Invalid var type')

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

引数:

ソースコード
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
     """
         曲线方程。
         Args:
@@ -79,7 +70,7 @@
         return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
     else:
         return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
- + \ No newline at end of file diff --git a/ja/api/mp_math/index.html b/ja/api/mp_math/index.html index 2febc80..3c93967 100644 --- a/ja/api/mp_math/index.html +++ b/ja/api/mp_math/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/ja/api/mp_math/line.html b/ja/api/mp_math/line.html index 3bd69d0..200c308 100644 --- a/ja/api/mp_math/line.html +++ b/ja/api/mp_math/line.html @@ -195,7 +195,7 @@ """ return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction) - + \ No newline at end of file diff --git a/ja/api/mp_math/mp_math_typing.html b/ja/api/mp_math/mp_math_typing.html index 40a7ecf..7679af8 100644 --- a/ja/api/mp_math/mp_math_typing.html +++ b/ja/api/mp_math/mp_math_typing.html @@ -12,13 +12,13 @@ - + -
Skip to content

var RealNumber = int | float

  • タイプ: TypeAlias

  • 説明: 实数

var Number = RealNumber | complex

  • タイプ: TypeAlias

  • 説明: 数

var Var = SingleVar | ArrayVar

  • タイプ: TypeAlias

  • 説明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • タイプ: TypeAlias

  • 説明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • タイプ: TypeAlias

  • 説明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • タイプ: TypeAlias

  • 説明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • タイプ: TypeAlias

  • 説明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • タイプ: TypeAlias

  • 説明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • タイプ: TypeAlias

  • 説明: 多元函数

- +
Skip to content

var RealNumber = int | float

  • タイプ: TypeAlias

  • 説明: 实数

var Number = RealNumber | complex

  • タイプ: TypeAlias

  • 説明: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • 説明: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • 説明: 数组变量

var Var = SingleVar | ArrayVar

  • タイプ: TypeAlias

  • 説明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • タイプ: TypeAlias

  • 説明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • タイプ: TypeAlias

  • 説明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • タイプ: TypeAlias

  • 説明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • タイプ: TypeAlias

  • 説明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • タイプ: TypeAlias

  • 説明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • タイプ: TypeAlias

  • 説明: 多元函数

+ \ No newline at end of file diff --git a/ja/api/mp_math/plane.html b/ja/api/mp_math/plane.html index 5ecda33..2e3b26b 100644 --- a/ja/api/mp_math/plane.html +++ b/ja/api/mp_math/plane.html @@ -213,7 +213,7 @@ raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

ソースコード
python
def __eq__(self, other) -> bool:
     return self.approx(other)

method __rand__(self, other: Line3) -> Point3

ソースコード
python
def __rand__(self, other: 'Line3') -> 'Point3':
     return self.cal_intersection_point3(other)
- + \ No newline at end of file diff --git a/ja/api/mp_math/point.html b/ja/api/mp_math/point.html index 34086dc..451fed9 100644 --- a/ja/api/mp_math/point.html +++ b/ja/api/mp_math/point.html @@ -68,7 +68,7 @@ """ from .vector import Vector3 return Vector3(self.x - other.x, self.y - other.y, self.z - other.z) - + \ No newline at end of file diff --git a/ja/api/mp_math/segment.html b/ja/api/mp_math/segment.html index 82b2241..5f58bd3 100644 --- a/ja/api/mp_math/segment.html +++ b/ja/api/mp_math/segment.html @@ -31,7 +31,7 @@ self.length = self.direction.length '中心点' self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2) - + \ No newline at end of file diff --git a/ja/api/mp_math/utils.html b/ja/api/mp_math/utils.html index 1fb8fd4..ac1a846 100644 --- a/ja/api/mp_math/utils.html +++ b/ja/api/mp_math/utils.html @@ -81,7 +81,7 @@ self.raise_type_error(other)

method raise_type_error(self, other)

ソースコード
python
def raise_type_error(self, other):
     raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

ソースコード
python
def __ne__(self, other):
     return not self.__eq__(other)
- + \ No newline at end of file diff --git a/ja/api/mp_math/vector.html b/ja/api/mp_math/vector.html index 451b98c..9f4b447 100644 --- a/ja/api/mp_math/vector.html +++ b/ja/api/mp_math/vector.html @@ -204,7 +204,7 @@ return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

ソースコード
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
     return Vector3(self.x / other, self.y / other, self.z / other)

method - self

ソースコード
python
def __neg__(self):
     return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

var x_axis = Vector3(1, 0, 0)

var y_axis = Vector3(0, 1, 0)

var z_axis = Vector3(0, 0, 1)

- + \ No newline at end of file diff --git a/ja/api/particle/index.html b/ja/api/particle/index.html index 09539fc..69b3fa1 100644 --- a/ja/api/particle/index.html +++ b/ja/api/particle/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/ja/api/presets/index.html b/ja/api/presets/index.html index 2f6b447..77fcfcc 100644 --- a/ja/api/presets/index.html +++ b/ja/api/presets/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/ja/api/presets/model/index.html b/ja/api/presets/model/index.html index c45587d..032d497 100644 --- a/ja/api/presets/model/index.html +++ b/ja/api/presets/model/index.html @@ -35,7 +35,7 @@ y_array = radius * np.sin(phi_list) * np.sin(theta_list) z_array = radius * np.cos(phi_list) return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)] - + \ No newline at end of file diff --git a/md-ex.html b/md-ex.html index b5968e4..56d16c1 100644 --- a/md-ex.html +++ b/md-ex.html @@ -50,7 +50,7 @@ ::: details This is a details block. :::

Output

INFO

This is an info box.

TIP

This is a tip.

WARNING

This is a warning.

DANGER

This is a dangerous warning.

Details

This is a details block.

More

Check out the documentation for the full list of markdown extensions.

- + \ No newline at end of file diff --git a/zht/api/index.html b/zht/api/index.html index 0653b50..a0fb5dc 100644 --- a/zht/api/index.html +++ b/zht/api/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/zht/api/mp_math/angle.html b/zht/api/mp_math/angle.html index e855845..0f26fd8 100644 --- a/zht/api/mp_math/angle.html +++ b/zht/api/mp_math/angle.html @@ -116,7 +116,7 @@ if isinstance(other, AnyAngle): return self.radian / other.radian return AnyAngle(self.radian / other, is_radian=True) - + \ No newline at end of file diff --git a/zht/api/mp_math/const.html b/zht/api/mp_math/const.html index 66d1a5b..7fb3172 100644 --- a/zht/api/mp_math/const.html +++ b/zht/api/mp_math/const.html @@ -12,13 +12,13 @@ - + -
Skip to content
- +
Skip to content

var EPSILON = 0.0001

  • 説明: ε

var APPROX = 0.001

  • 説明: 约等于误差
+ \ No newline at end of file diff --git a/zht/api/mp_math/equation.html b/zht/api/mp_math/equation.html index 118d2dc..3f2553d 100644 --- a/zht/api/mp_math/equation.html +++ b/zht/api/mp_math/equation.html @@ -12,7 +12,7 @@ - + @@ -47,16 +47,7 @@ return result_func(*args) return high_order_partial_derivative_func else: - raise ValueError('Invalid var type')

func partial_derivative_func() -> Var

源碼
python
def partial_derivative_func(*args: Var) -> Var:
-    args_list_plus = list(args)
-    args_list_plus[var] += epsilon
-    args_list_minus = list(args)
-    args_list_minus[var] -= epsilon
-    return (func(*args_list_plus) - func(*args_list_minus)) / (2 * epsilon)

func high_order_partial_derivative_func() -> Var

源碼
python
def high_order_partial_derivative_func(*args: Var) -> Var:
-    result_func = func
-    for v in var:
-        result_func = get_partial_derivative_func(result_func, v, epsilon)
-    return result_func(*args)

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

變數説明:

源碼
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+        raise ValueError('Invalid var type')

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

變數説明:

源碼
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
     """
         曲线方程。
         Args:
@@ -79,7 +70,7 @@
         return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
     else:
         return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
- + \ No newline at end of file diff --git a/zht/api/mp_math/index.html b/zht/api/mp_math/index.html index 1ab691a..8575fff 100644 --- a/zht/api/mp_math/index.html +++ b/zht/api/mp_math/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/zht/api/mp_math/line.html b/zht/api/mp_math/line.html index ba5d2ca..160138f 100644 --- a/zht/api/mp_math/line.html +++ b/zht/api/mp_math/line.html @@ -195,7 +195,7 @@ """ return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction) - + \ No newline at end of file diff --git a/zht/api/mp_math/mp_math_typing.html b/zht/api/mp_math/mp_math_typing.html index 947882f..9f5f370 100644 --- a/zht/api/mp_math/mp_math_typing.html +++ b/zht/api/mp_math/mp_math_typing.html @@ -12,13 +12,13 @@ - + -
Skip to content

var RealNumber = int | float

  • 類型: TypeAlias

  • 説明: 实数

var Number = RealNumber | complex

  • 類型: TypeAlias

  • 説明: 数

var Var = SingleVar | ArrayVar

  • 類型: TypeAlias

  • 説明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • 類型: TypeAlias

  • 説明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • 類型: TypeAlias

  • 説明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • 類型: TypeAlias

  • 説明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • 類型: TypeAlias

  • 説明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • 類型: TypeAlias

  • 説明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • 類型: TypeAlias

  • 説明: 多元函数

- +
Skip to content

var RealNumber = int | float

  • 類型: TypeAlias

  • 説明: 实数

var Number = RealNumber | complex

  • 類型: TypeAlias

  • 説明: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • 説明: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • 説明: 数组变量

var Var = SingleVar | ArrayVar

  • 類型: TypeAlias

  • 説明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • 類型: TypeAlias

  • 説明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • 類型: TypeAlias

  • 説明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • 類型: TypeAlias

  • 説明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • 類型: TypeAlias

  • 説明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • 類型: TypeAlias

  • 説明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • 類型: TypeAlias

  • 説明: 多元函数

+ \ No newline at end of file diff --git a/zht/api/mp_math/plane.html b/zht/api/mp_math/plane.html index 58c47da..311c551 100644 --- a/zht/api/mp_math/plane.html +++ b/zht/api/mp_math/plane.html @@ -213,7 +213,7 @@ raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

源碼
python
def __eq__(self, other) -> bool:
     return self.approx(other)

method __rand__(self, other: Line3) -> Point3

源碼
python
def __rand__(self, other: 'Line3') -> 'Point3':
     return self.cal_intersection_point3(other)
- + \ No newline at end of file diff --git a/zht/api/mp_math/point.html b/zht/api/mp_math/point.html index 27df260..e510a88 100644 --- a/zht/api/mp_math/point.html +++ b/zht/api/mp_math/point.html @@ -68,7 +68,7 @@ """ from .vector import Vector3 return Vector3(self.x - other.x, self.y - other.y, self.z - other.z) - + \ No newline at end of file diff --git a/zht/api/mp_math/segment.html b/zht/api/mp_math/segment.html index 0dd27b8..c3c7d95 100644 --- a/zht/api/mp_math/segment.html +++ b/zht/api/mp_math/segment.html @@ -31,7 +31,7 @@ self.length = self.direction.length '中心点' self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2) - + \ No newline at end of file diff --git a/zht/api/mp_math/utils.html b/zht/api/mp_math/utils.html index 3626da7..9d5661e 100644 --- a/zht/api/mp_math/utils.html +++ b/zht/api/mp_math/utils.html @@ -81,7 +81,7 @@ self.raise_type_error(other)

method raise_type_error(self, other)

源碼
python
def raise_type_error(self, other):
     raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

源碼
python
def __ne__(self, other):
     return not self.__eq__(other)
- + \ No newline at end of file diff --git a/zht/api/mp_math/vector.html b/zht/api/mp_math/vector.html index d40c33f..4777ee9 100644 --- a/zht/api/mp_math/vector.html +++ b/zht/api/mp_math/vector.html @@ -204,7 +204,7 @@ return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

源碼
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
     return Vector3(self.x / other, self.y / other, self.z / other)

method - self

源碼
python
def __neg__(self):
     return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

var x_axis = Vector3(1, 0, 0)

var y_axis = Vector3(0, 1, 0)

var z_axis = Vector3(0, 0, 1)

- + \ No newline at end of file diff --git a/zht/api/particle/index.html b/zht/api/particle/index.html index 17104b1..909521d 100644 --- a/zht/api/particle/index.html +++ b/zht/api/particle/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/zht/api/presets/index.html b/zht/api/presets/index.html index e96897c..d6a3e90 100644 --- a/zht/api/presets/index.html +++ b/zht/api/presets/index.html @@ -18,7 +18,7 @@
Skip to content
- + \ No newline at end of file diff --git a/zht/api/presets/model/index.html b/zht/api/presets/model/index.html index fc19cf2..306b781 100644 --- a/zht/api/presets/model/index.html +++ b/zht/api/presets/model/index.html @@ -35,7 +35,7 @@ y_array = radius * np.sin(phi_list) * np.sin(theta_list) z_array = radius * np.cos(phi_list) return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)] - + \ No newline at end of file