circle_bundles.T2FlatMetric
- class circle_bundles.T2FlatMetric(name='T2_flat', base_name='T^2', base_name_latex='\\mathbb{T}^2')[source]
Bases:
objectFlat metric on the 2-torus \(\mathbb{T}^2\).
Points are represented as angle pairs
(θ₁, θ₂)in radians, interpreted modulo2πin each coordinate. The distance is computed using the product of circular distances in each factor:\[d(x,y) = \sqrt{ d_{S^1}(x_1,y_1)^2 + d_{S^1}(x_2,y_2)^2 }.\]This metric is appropriate when: - your base space is a genuine torus (no quotient identifications), and - coordinates are stored explicitly as angles.
Notes
Input angles may lie outside
[0, 2π); wrapping is handled implicitly.This metric is frequently used as the upstairs metric before taking Z₂ quotients (e.g. Klein bottle, diagonal quotients).
- __init__(name='T2_flat', base_name='T^2', base_name_latex='\\mathbb{T}^2')
Methods
__init__([name, base_name, base_name_latex])pairwise(X[, Y])Compute flat torus distances between angle-coordinate samples.
Attributes
- pairwise(X, Y=None)[source]
Compute flat torus distances between angle-coordinate samples.
- Parameters:
- Returns:
Distance matrix of shape
(n, m).- Return type:
D
- Raises:
ValueError – If
XorYdoes not have shape(*, 2).