2024-08-28 20:35:22 +08:00
<!DOCTYPE html>
2024-08-28 22:08:21 +08:00
< html lang = "ja-JP" dir = "ltr" >
2024-08-28 20:35:22 +08:00
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width,initial-scale=1" >
2024-08-31 06:08:36 +08:00
< title > mbcp.mp_math.equation | MBCP ドキュメント< / title >
< meta name = "description" content = "MBCP ライブラリ ドキュメント" >
2024-08-28 20:35:22 +08:00
< meta name = "generator" content = "VitePress v1.3.4" >
2024-08-31 07:55:26 +08:00
< link rel = "preload stylesheet" href = "/assets/style.UiSpMRXd.css" as = "style" >
2024-08-28 20:35:22 +08:00
2024-08-31 09:34:37 +08:00
< script type = "module" src = "/assets/app.Dm0AjMTk.js" > < / script >
< link rel = "modulepreload" href = "/assets/chunks/theme.BI8DQ_2g.js" >
2024-08-31 07:55:26 +08:00
< link rel = "modulepreload" href = "/assets/chunks/framework.DpC1ZpOZ.js" >
2024-08-31 09:34:37 +08:00
< link rel = "modulepreload" href = "/assets/ja_api_mp_math_equation.md.CwX1EUnA.lean.js" >
2024-08-31 06:08:36 +08:00
< link rel = "icon" type = "image/svg+xml" href = "/mbcp-logo.svg" >
2024-08-31 07:31:49 +08:00
< link rel = "stylesheet" href = "https://fonts.font.im/css?family=Cousine:400,400i,700,700i|Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i" >
2024-08-28 20:35:22 +08:00
< script id = "check-dark-mode" > ( ( ) => { const e = localStorage . getItem ( "vitepress-theme-appearance" ) || "auto" , a = window . matchMedia ( "(prefers-color-scheme: dark)" ) . matches ; ( ! e || e === "auto" ? a : e === "dark" ) && document . documentElement . classList . add ( "dark" ) } ) ( ) ; < / script >
< script id = "check-mac-os" > document . documentElement . classList . toggle ( "mac" , /Mac|iPhone|iPod|iPad/i . test ( navigator . platform ) ) ; < / script >
< / head >
< body >
2024-08-31 09:34:37 +08:00
< div id = "app" > < div class = "Layout" data-v-22f859ac > <!-- [ --> <!-- ] --> <!-- [ --> < span tabindex = "-1" data-v-3e86afbf > < / span > < a href = "#VPContent" class = "VPSkipLink visually-hidden" data-v-3e86afbf > Skip to content < / a > <!-- ] --> <!-- --> < header class = "VPNav" data-v-22f859ac data-v-2a4e514e > < div class = "VPNavBar has-sidebar top" data-v-2a4e514e data-v-1303e283 > < div class = "wrapper" data-v-1303e283 > < div class = "container" data-v-1303e283 > < div class = "title" data-v-1303e283 > < div class = "VPNavBarTitle has-sidebar" data-v-1303e283 data-v-10b95b50 > < a class = "title" href = "/ja/" data-v-10b95b50 > <!-- [ --> <!-- ] --> <!-- [ --> < img class = "VPImage logo" src = "/mbcp-logo.svg" alt data-v-f925500d > <!-- ] --> < span data-v-10b95b50 > MBCP ドキュメント< / span > <!-- [ --> <!-- ] --> < / a > < / div > < / div > < div class = "content" data-v-1303e283 > < div class = "content-body" data-v-1303e283 > <!-- [ --> <!-- ] --> < div class = "VPNavBarSearch search" data-v-1303e283 > <!-- [ --> <!-- --> < div id = "local-search" > < button type = "button" class = "DocSearch DocSearch-Button" aria-label = "検索を開く" > < span class = "DocSearch-Button-Container" > < span class = "vp-icon DocSearch-Search-Icon" > < / span > < span class = "DocSearch-Button-Placeholder" > 検索< / span > < / span > < span class = "DocSearch-Button-Keys" > < kbd class = "DocSearch-Button-Key" > < / kbd > < kbd class = "DocSearch-Button-Key" > K< / kbd > < / span > < / button > < / div > <!-- ] --> < / div > < nav aria-labelledby = "main-nav-aria-label" class = "VPNavBarMenu menu" data-v-1303e283 data-v-0fb289c1 > < span id = "main-nav-aria-label" class = "visually-hidden" data-v-0fb289c1 > Main Navigation < / span > <!-- [ --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/ja/guide/" tabindex = "0" data-v-0fb289c1 data-v-ad4a8b64 > <!-- [ --> < span data-v-ad4a8b64 > スタート< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/ja/refer.html" tabindex = "0" data-v-0fb289c1 data-v-ad4a8b64 > <!-- [ --> < span data-v-ad4a8b64 > リファレンス< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/ja/api/" tabindex = "0" data-v-0fb289c1 data-v-ad4a8b64 > <!-- [ --> < span data-v-ad4a8b64 > APIリファレンス< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/ja/demo/" tabindex = "0" data-v-0fb289c1 data-v-ad4a8b64 > <!-- [ --> < span data-v-ad4a8b64 > インスタンス< / span > <!-- ] --> < / a > <!-- ] --> <!-- ] --> < / nav > < div class = "VPFlyout VPNavBarTranslations translations" data-v-1303e283 data-v-cd7b67e8 data-v-ec8c49bc > < button type = "button" class = "button" aria-haspopup = "true" aria-expanded = "false" aria-label = "Change language" data-v-ec8c49bc > < span class = "text" data-v-ec8c49bc > < span class = "vpi-languages option-icon" data-v-ec8c49bc > < / span > <!-- --> < span class = "vpi-chevron-down text-icon" data-v-ec8c49bc > < / span > < / span > < / button > < div class = "menu" data-v-ec8c49bc > < div class = "VPMenu" data-v-ec8c49bc data-v-9990563e > <!-- --> <!-- [ --> <!-- [ --> < div class = "items" data-v-cd7b67e8 > < p class = "title" data-v-cd7b67e8 > 日本語< / p > <!-- [ --> < div class = "VPMenuLink" data-v-cd7b67e8 data-v-79776a7a > < a class = "VPLink link" href = "/api/mp_math/equation.html" data-v-79776a7a > <!-- [ --> 简体中文<!-- ] --> < / a > < / div > < div class = "VPMenuLink" data-v-cd7b67e8 data-v-79776a7a > < a class = "VPLink link" href = "/en/api/mp_math/equation.html" data-v-79776a7a > <!-- [ --> English<!-- ] --> < / a > < / div > < div class = "VPMenuLink" data-v-cd7b67e8 data-v-79776a7a > < a class = "VPLink link" href = "/zht/api/mp_math/equation.html" data-v-79776a7a > <!-- [ --> 繁體中文<!-- ] --> < / a > < / div > <!-- ] --> < / div > <!-- ] --> <!-- ] --> < / div > < / div > < / div > < div class = "VPNavBarAppearance appearance" data-v-1303e283 data-v-2a6692f8 > < button class = "VPSwitch VPSwitchAppearance" type = "button" role = "switch" title = "Switch to dark theme" aria-checked = "false" data-v-2a6692f8 data-v-3a50aa5c data-v-d82e607b > < span class = "check" data-v-d82e607b > < span class = "icon" data-v-d82e607b > <!-- [ --> < span class = "vpi-sun sun" data-v-3a50aa5c > < / span > < span class = "vpi-moon moon" data-v-3a50aa5c > < / span > <!-- ] --> < / span > < / span > < / button > < / div > < div class = "VPSocialLinks VPNavBarSocialLinks social-links" data-v-1303e283 data-v-f3b91b3a data-v-fa18fe49 > <!-- [ --> < a class = "VPSocialLink no-icon" href = "https://github.c
2024-08-30 13:46:30 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 曲线方程。< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Args:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > x_func ([`OneVarFunc`](./mp_math_typing#var-onevarfunc)): x函数< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > y_func ([`OneVarFunc`](./mp_math_typing#var-onevarfunc)): y函数< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > z_func ([`OneVarFunc`](./mp_math_typing#var-onevarfunc)): z函数< / span > < / span >
2024-08-30 13:46:30 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x_func < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > x_func< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y_func < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > y_func< / span > < / span >
2024-08-31 06:57:34 +08:00
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z_func < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > z_func< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "def-call-self-t-var-point3-tuple-point3" tabindex = "-1" > < em > < strong > def< / strong > < / em > < code > __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]< / code > < a class = "header-anchor" href = "#def-call-self-t-var-point3-tuple-point3" aria-label = "Permalink to "***def*** `__call__(self, *t: Var) -> Point3 | tuple[Point3, ...]`"" > < / a > < / h4 > < p > < strong > 説明< / strong > : 计算曲线上的点。< / p > < p > < strong > 引数< / strong > :< / p > < blockquote > < ul > < li > *t:< / li > < li > 参数:< / li > < / ul > < / blockquote > < p > < strong > 戻り値< / strong > : 目标点< / p > < details > < summary > < b > ソースコード< / b > または < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L24" target = "_blank" > GitHubで表示< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __call__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > t: Var) -> Point3 < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > |< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > tuple[Point3, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > ...< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ]:< / span > < / span >
2024-08-30 13:46:30 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 计算曲线上的点。< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Args:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > *t:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 参数< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 目标点< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > len< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (t) < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > ==< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > 1< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > Point3(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x_func(t[< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > 0< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ]), < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y_func(t[< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > 0< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ]), < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z_func(t[< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > 0< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ]))< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > else< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > tuple< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ([Point3(x, y, z) < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > for< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > x, y, z < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > in< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > zip< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x_func(t), < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y_func(t), < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z_func(t))])< / span > < / span > < / code > < / pre > < / div > < / details > < h3 id = "def-get-partial-derivative-func-func-multivarsfunc-var-int-tuple-int-epsilon-number-epsilon-multivarsfunc" tabindex = "-1" > < em > < strong > def< / strong > < / em > < code > get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -> MultiVarsFunc< / code > < a class = "header-anchor" href = "#def-get-partial-derivative-func-func-multivarsfunc-var-int-tuple-int-epsilon-number-epsilon-multivarsfunc" aria-label = "Permalink to "***def*** `get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -> MultiVarsFunc`"" > < / a > < / h3 > < p > < strong > 説明< / strong > : 求N元函数一阶偏导函数。这玩意不太稳定, 慎用。< / p > < div class = "warning custom-block github-alert" > < p class = "custom-block-title" > WARNING< / p > < p > 目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升< / p > < / div > < p > < strong > 引数< / strong > :< / p > < blockquote > < ul > < li > func (< a href = "./mp_math_typing.html#var-multivarsfunc" > < code > MultiVarsFunc< / code > < / a > ): N元函数< / li > < li > var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)< / li > < li > epsilon: 偏移量< / li > < / ul > < / blockquote > < p > < strong > 戻り値< / strong > : 偏导函数< / p > < p > < strong > 例外< / strong > :< / p > < blockquote > < ul > < li > ValueError 无效变量类型< / li > < / ul > < / blockquote > < details > < summary > < b > ソースコード< / b > または < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L42" target = "_blank" > GitHubで表示< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > get_partial_derivative_func< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (func: MultiVarsFunc, var: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > int< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > |< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > tuple[< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > int< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > ...< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ], epsilon: Number< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > EPSILON< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> MultiVarsFunc:< / span > < / span >
2024-08-28 20:35:22 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 求N元函数一阶偏导函数。这玩意不太稳定, 慎用。< / span > < / span >
2024-08-29 18:31:08 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > > [!warning]< / span > < / span >
2024-08-29 18:52:57 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > > 目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升< / span > < / span >
2024-08-29 18:31:08 +08:00
< span class = "line" > < / span >
2024-08-28 20:35:22 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Args:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > func ([`MultiVarsFunc`](./mp_math_typing#var-multivarsfunc)): N元函数< / span > < / span >
2024-08-28 20:35:22 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > epsilon: 偏移量< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 偏导函数< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Raises:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ValueError: 无效变量类型< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > isinstance< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (var, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > int< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ):< / span > < / span >
< span class = "line" > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > partial_derivative_func< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > args: Var) -> Var:< / span > < / span >
2024-08-29 19:00:41 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " @litedoc-hide" " " < / span > < / span >
2024-08-28 20:35:22 +08:00
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > args_list_plus < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > list< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (args)< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > args_list_plus[var] < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > +=< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > epsilon< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > args_list_minus < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > list< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (args)< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > args_list_minus[var] < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > -=< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > epsilon< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (func(< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > args_list_plus) < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > -< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > func(< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > args_list_minus)) < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > /< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > 2< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > epsilon)< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > partial_derivative_func< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > elif< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > isinstance< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (var, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > tuple< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ):< / span > < / span >
< span class = "line" > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > high_order_partial_derivative_func< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > args: Var) -> Var:< / span > < / span >
2024-08-29 19:00:41 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > @litedoc-hide< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 求高阶偏导函数< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Args:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > *args: 参数< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 高阶偏导数值< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
2024-08-28 20:35:22 +08:00
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > result_func < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > func< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > for< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > v < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > in< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > var:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > result_func < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > get_partial_derivative_func(result_func, v, epsilon)< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > result_func(< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > args)< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > high_order_partial_derivative_func< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > else< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-08-31 08:04:13 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > raise< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > ValueError< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Invalid var type' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )< / span > < / span > < / code > < / pre > < / div > < / details > < / div > < / div > < / main > < footer class = "VPDocFooter" data-v-40342069 data-v-a4b38bd6 > <!-- [ --> <!-- ] --> < div class = "edit-info" data-v-a4b38bd6 > < div class = "edit-link" data-v-a4b38bd6 > < a class = "VPLink link vp-external-link-icon no-icon edit-link-button" href = "https://github.com/snowykami/mbcp/tree/main/mbcp//mp_math/equation.py" target = "_blank" rel = "noreferrer" data-v-a4b38bd6 > <!-- [ --> < span class = "vpi-square-pen edit-link-icon" data-v-a4b38bd6 > < / span > このページをGitHubで編集する<!-- ] --> < / a > < / div > <!-- --> < / div > < nav class = "prev-next" aria-labelledby = "doc-footer-aria-label" data-v-a4b38bd6 > < span class = "visually-hidden" id = "doc-footer-aria-label" data-v-a4b38bd6 > Pager< / span > < div class = "pager" data-v-a4b38bd6 > < a class = "VPLink link pager-link prev" href = "/ja/api/mp_math/const.html" data-v-a4b38bd6 > <!-- [ --> < span class = "desc" data-v-a4b38bd6 > 前のページ< / span > < span class = "title" data-v-a4b38bd6 > mbcp.mp_math.const< / span > <!-- ] --> < / a > < / div > < div class = "pager" data-v-a4b38bd6 > < a class = "VPLink link pager-link next" href = "/ja/api/mp_math/function.html" data-v-a4b38bd6 > <!-- [ --> < span class = "desc" data-v-a4b38bd6 > 次のページ< / span > < span class = "title" data-v-a4b38bd6 > mbcp.mp_math.function< / span > <!-- ] --> < / a > < / div > < / nav > < / footer > <!-- [ --> <!-- ] --> < / div > < / div > < / div > <!-- [ --> <!-- ] --> < / div > < / div > < footer class = "VPFooter has-sidebar" data-v-22f859ac data-v-e3ca6860 > < div class = "container" data-v-e3ca6860 > < p class = "message" data-v-e3ca6860 > < a href = "https://vitepress.dev/" > VitePress< / a > で構築されたドキュメント | < a href = "https://github.com/LiteyukiStudio/litedoc" > litedoc< / a > によって生成されたAPIリファレンス< / p > < p class = "copyright" data-v-e3ca6860 > Copyright (C) 2020-2024 SnowyKami. All Rights Reserved< / p > < / div > < / footer > <!-- [ --> <!-- ] --> < / div > < / div >
2024-08-31 09:34:37 +08:00
< script > w i n d o w . _ _ V P _ H A S H _ M A P _ _ = J S O N . p a r s e ( " { \ " a p i _ a p i . m d \ " : \ " m z I S W u i q \ " , \ " a p i _ i n d e x . m d \ " : \ " D S l j i i 6 t \ " , \ " a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " 3 N a 5 I a Y p \ " , \ " a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " O 6 c T u l w X \ " , \ " a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " z 8 5 z y C Z L \ " , \ " a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " B h m J q p O o \ " , \ " a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " D H h P N V 6 R \ " , \ " a p i _ m p _ m a t h _ l i n e . m d \ " : \ " D o v i 6 b d M \ " , \ " a p i _ m p _ m a t h _ m p _ m a t h . m d \ " : \ " m V a b Z T H d \ " , \ " a p i _ m p _ m a t h _ m p _ m a t h _ t y p i n g . m d \ " : \ " C E r y C R E V \ " , \ " a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " D v - G W b J g \ " , \ " a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " B v v r K T Y 8 \ " , \ " a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " _ n _ _ V i V t \ " , \ " a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " k W 3 A - l G 9 \ " , \ " a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " D v J c u P X W \ " , \ " a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " B x L V u q r y \ " , \ " a p i _ p a r t i c l e _ p a r t i c l e . m d \ " : \ " C i o L G 9 A b \ " , \ " a p i _ p r e s e t s _ i n d e x . m d \ " : \ " C 7 s B j 6 Q 8 \ " , \ " a p i _ p r e s e t s _ m o d e l _ i n d e x . m d \ " : \ " F 2 z e h 9 P 2 \ " , \ " a p i _ p r e s e t s _ m o d e l _ m o d e l . m d \ " : \ " B o o c A 5 9 j \ " , \ " a p i _ p r e s e t s _ p r e s e t s . m d \ " : \ " k I U J t f c k \ " , \ " d e m o _ i n d e x . m d \ " : \ " C V A d l a F I \ " , \ " e n _ a p i _ a p i . m d \ " : \ " D F u v T 6 u G \ " , \ " e n _ a p i _ i n d e x . m d \ " : \ " 2 9 g 4 _ d d H \ " , \ " e n _ a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " 0 9 R 7 p x w _ \ " , \ " e n _ a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " D j b x F o G O \ " , \ " e n _ a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " D B X w I C 0 s \ " , \ " e n _ a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " n J - E 5 W 5 r \ " , \ " e n _ a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " y p H G E n m b \ " , \ " e n _ a p i _ m p _ m a t h _ l i n e . m d \ " : \ " D 0 A f s x W D \ " , \ " e n _ a p i _ m p _ m a t h _ m p _ m a t h . m d \ " : \ " 5 I i s T I t 3 \ " , \ " e n _ a p i _ m p _ m a t h _ m p _ m a t h _ t y p i n g . m d \ " : \ " D W j z t C j 6 \ " , \ " e n _ a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " 3 x s Z d W o R \ " , \ " e n _ a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " C x C g y 1 8 1 \ " , \ " e n _ a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " B e v q u O v V \ " , \ " e n _ a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " r V P - A 7 1 G \ " , \ " e n _ a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " D M w D 5 9 Y V \ " , \ " e n _ a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " N e z C 9 0 n G \ " , \ " e n _ a p i _ p a r t i c l e _ p a r t i c l e . m d \ " : \ " B T k 7 x B - d \ " , \ " e n _ a p i _ p r e s e t s _ i n d e x . m d \ " : \ " C l h g 0 Y L X \ " , \ " e n _ a p i _ p r e s e t s _ m o d e l _ i n d e x . m d \ " : \ " _ h b R 1 U 4 0 \ " , \ " e n _ a p i _ p r e s e t s _ m o d e l _ m o d e l . m d \ " : \ " B 9 F f c M g c \ " , \ " e n _ a p i _ p r e s e t s _ p r e s e t s . m d \ " : \ " 5 p M o s E d X \ " , \ " e n _ g u i d e _ i n d e x . m d \ " : \ " C 3 k I 8 f 8 A \ " , \ " e n _ i n d e x . m d \ " : \ " D 5 C d d O W - \ " , \ " e n _ r e f e r _ i n d e x . m d \ " : \ " C q 6 G W i 0 V \ " , \ " g u i d e _ i n d e x . m d \ " : \ " B V h Q 0 k P y \ " , \ " i n d e x . m d \ " : \ " D J W B R k U z \ " , \ " j a _ a p i _ a p i . m d \ " : \ " B z 3 9 - s M D \ " , \ " j a _ a p i _ i n d e x . m d \ " : \ " D 2 q T R 3 y I \ " , \ " j a _ a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " C A q 1 h H o v \ " , \ " j a _ a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " C A C m M 3 Q 4 \ " , \ " j a _ a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " C w X 1 E U n A \ " , \ " j a _ a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " B p y L W M m S \ " , \ " j a _ a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " B _ U D R W J p \ " , \ " j a _ a p i _ m p _ m a t h _ l i n e . m d \ " : \ " B z y t b S s M \ " , \ " j a _ a p i _ m p _ m a t h _ m p _ m a t h . m d \ " : \ " D G l - Y q o j \ " , \ " j a _ a p i _ m p _ m a t h _ m p _ m a t h _ t y p i n g . m d \ " : \ " B A N G f x 9 Q \ " , \ " j a _ a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " B w 6 e c T D W \ " , \ " j a _ a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " C F C W a C v m \ " , \ " j a _ a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " c u L L X T S O \ " , \ " j a _ a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " C r P K k 6 u i \ " , \ " j a _ a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " P F G J i k 3 9 \ " , \ " j a _ a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " S X v J H p q E \ " , \ " j a _ a p i _ p a r t i c l e _ p a r t i c l e . m d \ " : \ " D p D q A P A 7 \ " , \ " j a _ a p i _ p r e s e t s _ i n d e x . m d \ " : \ " D r J 0 a e Z q \ " , \ " j a _ a p i _ p r e s e t s _ m o d e l _ i n d e x . m d \ " : \ " u b 3 R s B C 9 \ " , \ " j a _ a p i _ p r e s e t s _ m o d e l _ m o d e l . m d \ " : \ " D w - 6 m f u k \ " , \ " j a _ a p i _ p r e s e t s _ p r e s e t s . m d \ " : \ " B m 4 b 0 y E m \ " , \ " j a _ g u i d e _ i n d e x . m d \ " : \ " w 1 T f 2 A d m \ " , \ " j a _ i n d e x . m d \ " : \ " D n s q Z i 7 i \ " , \ " j a _ r e f e r _ i n d e x . m d \ " : \ " D a m U s c s 8 \ " , \ " r e f e r _ f u n c t i o n _ c u r r y . m d \ " : \ " D _ o q R D d 3 \ " , \ " r e f e r _ f u n c t i o n _ f u n c t i o n . m d \ " : \ " B i _ 8 2 l I J \ " , \ " r e f e r _ i n d e x . m d \ " : \ " y F Z W 0 k I 4 \ " , \ " z h t _ a p i _ a p i . m d \ " : \ " C e T 7 D a 2 J \ " , \ " z h t _ a p i _ i n d e x . m d \ " : \ " j P 3 p I y R V \ " , \ " z h t _ a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " x B Q 5 j f 2 w \ " , \ " z h t _ a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " D h n G o 4 6 u \ " , \ " z h t _ a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " C N q N d o 8 e \ " , \ " z h t _ a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " B Y w - s q J L \ " , \ " z h t _ a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " C - y t w I T _ \ " , \ " z h t _ a p i _ m p _ m a t h _ l i n e . m d \ " : \ " B K W l V J m v \ " , \ " z h t _ a p i _ m p _ m a t h _ m p _ m a t h . m d \ " : \ " W A o 9 6 w s Q \ " , \ " z h t _ a p i _ m p _ m a t h _ m p _ m a t h _ t y p i n g . m d \ " : \ " 2 4 7 5 K 9 x 4 \ " , \ " z h t _ a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " C b o 0 Q R Q D \ " , \ " z h t _ a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " C i 0 R y J l m \ " , \ " z h t _ a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " D _ x b G o 8 n \ " , \ " z h t _ a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " B s N V d U j t \ " , \ " z h t _ a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " C e l H Q _ 6 8 \ " , \ " z h t _ a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " C 8 w v 1 s G B \ " , \ " z h t _ a p i _ p a r t i c l e _ p a r t i c l e . m d \ " : \ " D L x D z J s b \ " , \ " z h t _ a p i _ p r e s e t s _ i n d e x . m d \ " : \ " C K W p X p 0 8 \ " , \ " z h t _ a p i _ p r e s e t s _ m o d e l _ i n d e x . m d \ " : \ " a 4 6 B v X 0 I \ " , \ " z h t _ a p i _ p r e s e t s _ m o d e l _ m o d e l . m d \ " : \ " C 8 P K D M 2 B \ " , \ " z h t _ a p i _ p r e s e t s _ p r e s e t s . m d \ " : \ " n x u S _ h T 6 \ " , \ " z h t _ g u i d e _ i n d e x . m d \ " : \ " B N n M V i C 8 \ " , \ " z h t _ i n d e x . m d \ " : \ " C U R 8 - Q X m \ " , \ " z h t _ r e f e r _ i n d e x . m d \ " : \ " B 7 C Q S 2 U W \ " } " ) ; f u n c t i o n d e s e r i a l i z e F u n c t i o n s ( r ) { r e t u r n A r r a y . i s A r r a y ( r )
2024-08-28 20:35:22 +08:00
< / body >
< / html >