circle_bundles.EuclideanMetric

class circle_bundles.EuclideanMetric(name='euclidean')[source]

Bases: object

Standard Euclidean metric on \(\mathbb{R}^d\).

This metric computes ordinary Euclidean distances between vectors using the ℓ² norm.

It is the default metric used throughout the library whenever no other metric is specified.

Parameters:

name (str)

name

Display name for the metric (default "euclidean").

Type:

str

__init__(name='euclidean')
Parameters:

name (str)

Return type:

None

Methods

__init__([name])

pairwise(X[, Y])

Compute Euclidean pairwise distances.

Attributes

name

pairwise(X, Y=None)[source]

Compute Euclidean pairwise distances.

Parameters:
  • X (ndarray) – Array of shape (n, d) or (n,) representing n points.

  • Y (ndarray | None) – Optional array of shape (m, d) or (m,). If omitted, uses X.

Returns:

Euclidean distance matrix of shape (n, m).

Return type:

D