Skip to content

Commit e34c816

Browse files
committed
fix formula rendering in zh miniob article
1 parent 2277082 commit e34c816

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/blog/zh/miniob-vector-database.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ private:
7373
7474
### 3.1 距离计算的数学原理
7575
76-
对于两个 \(n\) 维向量 \(\mathbf{a}\)\(\mathbf{b}\),欧几里得距离(L2)定义为:
76+
对于两个 `n` 维向量 `a``b`,欧几里得距离(L2)定义为:
7777
78-
$$ d(\mathbf{a}, \mathbf{b}) = \sqrt{\sum_{i=1}^{n} (a_i - b_i)^2} $$
78+
<p><strong>d(a, b) = ||a - b||<sub>2</sub> = √(Σ<sub>i=1</sub><sup>n</sup> (a<sub>i</sub> - b<sub>i</sub>)<sup>2</sup>)</strong></p>
7979
8080
在比较大小时,我们通常省略开方运算以减少 CPU 开销。
8181

0 commit comments

Comments
 (0)