circle_bundles.S1UnitVectorMetric
- class circle_bundles.S1UnitVectorMetric(name='S1_unitvec', base_name='S^1', base_name_latex='\\mathbb{S}^1')[source]
Bases:
objectGeodesic distance on \(\mathbb{S}^1\) using unit vectors in \(\mathbb{R}^2\).
Points are represented as (approximately) unit vectors
p, q ∈ R^2lying on the unit circle. The geodesic distance is the angle between the vectors:\[d(p, q) = \arccos(\langle p, q \rangle),\]where the dot product is clamped to
[-1, 1]for numerical stability.Use this metric when your base points are stored as 2D unit vectors (e.g.
(cos θ, sin θ)) rather than angles.Notes
This metric assumes inputs are unit vectors. If your vectors are not normalized, you should normalize them before calling
pairwise(), or use a different metric.Values are in radians in the range
[0, π].
- __init__(name='S1_unitvec', base_name='S^1', base_name_latex='\\mathbb{S}^1')
Methods
__init__([name, base_name, base_name_latex])pairwise(X[, Y])Compute geodesic distances on \(\mathbb{S}^1\) between unit-vector samples.
Attributes