リソース · ガイド・記事
Euclidean Distance
点と点の間のユークリッド距離を、ピタゴラスの定理から導き、1次元から n 次元まで拡張して示す短い参考資料です。幾何や最近傍点の問題に役立ちます。
確認日
元のサイトを開く: Euclidean Distance (元のサイトを新しいタブで開きます)ロードマップに追加
取り組んでいるロードマップにこのリソースを追加できます。自分用の追加リソースとして表示され、ロードマップの手順は変わらず、記録した手順数にも数えられません。
出典コンテンツの言語:英語
In mathematics, the Euclidean distance between two points in Euclidean space is the length of a line segment between the two points. It can be calculated from the Cartesian coordinates of the points using the Pythagorean theorem, therefore occasionally being called the Pythagorean distance. The distance between any two points on the real line is the absolute value of the numerical difference of their coordinates In three dimensions, for points given by their Cartesian coordinates, the distance is
PrepKit の概要
この概要は PrepKit 編集部がソースリポジトリをもとに執筆・確認したもので、リソース本文の引用ではありません。
- 対象
- ソースにレベルの記載はありません
- 形式
- リファレンス
扱っている内容
- 1次元、2次元、3次元の公式と、一般の n 次元の場合
- 点 (8,2,6) と (3,5,7) を使った3次元の計算例
使い方
PrepKit の学習アドバイスであり、ソースの主張ではありません。
任意の次元の点に使える関数を1つ書き、(8,2,6) と (3,5,7) で確かめてください。次に、距離の2乗を使って最も近い k 個の点を求めます。
範囲と制約
公式と3次元の例はすべて Wikipedia と MathIsFun の画像なので、本文だけから得られる情報はわずかです。他の距離尺度や数値精度についての説明はありません。
利用方法と形式
GitHub の MIT ライセンスの trekhleb/javascript-algorithms リポジトリにある、英語の無料 README です。
PrepKit が 2026/10/02 に確認しました。 リソースの出典のコミット: 85293e3e2b88
この概要の根拠
- src/algorithms/math/euclidean-distance/README.md
この項目を掲載しているページ
PrepKit ニュースレターを受け取る
任意です。PrepKit の利用には必要ありません。