-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
29e7caa
commit 0b87124
Showing
15 changed files
with
196 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/public/ | ||
/resources/_gen/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[submodule "themes/hugo-theme-stack"] | ||
path = themes/hugo-theme-stack | ||
url = https://github.com/CaiJimmy/hugo-theme-stack/ | ||
url = https://github.com/whateverzpy/hugo-theme-stack |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Zlog | ||
|
||
## 待办 | ||
|
||
- [ ] i18n 支持 | ||
- [ ] 搜索支持 | ||
- [ ] 评论支持 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
+++ | ||
date = '{{ .Date }}' | ||
draft = true | ||
title = '{{ replace .File.ContentBaseName "-" " " | title }}' | ||
+++ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"paths": { | ||
"*": [ | ||
"..\\themes\\hugo-theme-stack\\assets\\*" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
+++ | ||
categories = [] | ||
date = '2024-12-10' | ||
description = '' | ||
tags = [] | ||
title = '关于我' | ||
+++ | ||
|
||
## 关于我 | ||
|
||
- 只是一个平平无奇的计算机系学生。。。。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
+++ | ||
title = '文章' | ||
+++ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
+++ | ||
categories = [] | ||
date = '2024-12-10' | ||
description = '用 Hugo 搭建个人博客' | ||
tags = ['Hugo', '博客'] | ||
title = '浅尝 Hugo' | ||
image = 'hugo-logo-wide.svg' | ||
weight = -1 | ||
+++ | ||
|
||
## 关于 | ||
|
||
本博客由 [Hugo](https://gohugo.io/) 搭建。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
+++ | ||
categories = [] | ||
date = '2024-12-10' | ||
description = '最优化方法作业的解答' | ||
tags = ['最优化方法'] | ||
title = '最优化方法作业' | ||
weight = -2 | ||
+++ | ||
|
||
## 题目 1 | ||
|
||
$$ | ||
\begin{cases} | ||
\min &f(\mathbf{x})=(x_1-\frac{9}{4})^2+(x_2-2)^2 \\ | ||
s.t.&x_2-x_1^2\ge0, \\ | ||
&x_1+x_2\le6, \\ | ||
&x_1,x_2\ge0 | ||
\end{cases} | ||
$$ | ||
|
||
验证 $\mathbf{x}^*=(1.5,2.25)^T$ 是 K-T 点。 | ||
|
||
### 解答 | ||
|
||
$$ | ||
\begin{cases} | ||
g_1(\mathbf{x})=x_1^2-x_2 \\ | ||
g_2(\mathbf{x})=x_1+x_2-6 \\ | ||
g_3(\mathbf{x})=-x_1 \\ | ||
g_4(\mathbf{x})=-x_2 | ||
\end{cases} | ||
$$ | ||
|
||
显然仅有 $g_1(\mathbf{x}^*)=0$,$I=\{1\}$,计算梯度 | ||
|
||
$$ | ||
\begin{aligned} | ||
&\nabla f(\mathbf{x})=\begin{pmatrix}2x_1-\frac{9}{2} \\ 2x_2-4\end{pmatrix}^T \\ | ||
&\nabla g_1(\mathbf{x})=\begin{pmatrix}2x_1 \\ -1\end{pmatrix}^T | ||
\end{aligned} | ||
$$ | ||
|
||
将 $\mathbf{x}^*$ 代入得 | ||
|
||
$$ | ||
\begin{cases} | ||
-\frac{3}{2}+3u_1=0 \\ | ||
\frac{1}{2}-u_1=0 | ||
\end{cases} | ||
$$ | ||
|
||
解得 $u_1=\frac{1}{2}\ge0$,故 $\mathbf{x}^*=(1.5,2.25)^T$ 是 K-T 点。 | ||
|
||
## 题目 2 | ||
|
||
通过 K-T 条件求解下列问题 | ||
|
||
$$ | ||
\begin{cases} | ||
\min &f(\mathbf{x})=-3x_1+x_2-x_3^2 \\ | ||
s.t.&x_1+x_2+x_3\le0, \\ | ||
&-x_1+2x_2+x_3^2=0 | ||
\end{cases} | ||
$$ | ||
|
||
### 解答 | ||
|
||
计算梯度 | ||
|
||
$$ | ||
\nabla f(\mathbf{x})=\begin{pmatrix}-3 \\ 1 \\ -2x_3\end{pmatrix}^T | ||
$$ | ||
|
||
海塞矩阵 | ||
|
||
$$ | ||
\nabla^2f(\mathbf{x})=\begin{pmatrix}0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & -2\end{pmatrix} | ||
$$ | ||
|
||
不是正定矩阵或半正定矩阵,因此该问题不是凸优化,可以观察到,若令 | ||
|
||
$$ | ||
x_1=0,x_2=- \frac{1}{2}x_3^2 | ||
$$ | ||
|
||
显然有 $f(\mathbf{x})$ 无界,不存在最优解。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
baseURL = 'https://example.org/' | ||
languageCode = 'zh-CN' | ||
title = 'WhateverZ' | ||
theme = "hugo-theme-stack" | ||
has-CJKLanguage = true | ||
defaultContentLanguage = "zh-cn" | ||
|
||
[Params] | ||
favicon = "/favicon.png" | ||
math = true | ||
|
||
[Params.Sidebar] | ||
avatar = { src = "/avatar.png" } | ||
|
||
[Params.Footer] | ||
since = 2024 | ||
|
||
[menus] | ||
[[menus.main]] | ||
name = '主页' | ||
title = '主页' | ||
pageRef = '/' | ||
weight = 10 | ||
[[menus.main]] | ||
name = '文章' | ||
title = '文章' | ||
pageRef = '/post' | ||
weight = 20 | ||
[[menus.main]] | ||
name = '关于' | ||
title = '关于' | ||
pageRef = '/about' | ||
weight = 30 | ||
|
||
[Params.Article] | ||
math = true | ||
|
||
[markup] | ||
[markup.goldmark] | ||
[markup.goldmark.renderer] | ||
unsafe = true | ||
[markup.goldmark.extensions.passthrough] | ||
enable = true | ||
delimiters.block = [ | ||
["\\[", "\\]"], | ||
["$$", "$$"] | ||
] | ||
delimiters.inline = [ | ||
["\\(", "\\)"], | ||
["$", "$"] | ||
] |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.