Skip to main content

Coords

Struct Coords 

Source
pub struct Coords<F: Field, const N: usize, const M: usize = 0>(pub [F; N]);
Expand description

The canonical model of flat pseudo-Euclidean coordinate space R^(Nβˆ’M, M).

A fixed-size array of N coordinates over the field R, carrying the algebraic structure of a vector space together with a symmetric bilinear form of signature (N βˆ’ M, M): N βˆ’ M positive (spacelike) directions and M negative (timelike) ones. The first M coordinates are the negative-signature directions; the remaining N βˆ’ M are positive.

This is the space in which local coordinate charts take their values and in which tangent vectors live. With the default M = 0 it is ordinary flat Euclidean space R^N β€” positive-definite, hence carrying a genuine norm and Metric. With M > 0 the form is indefinite: it is a Bilinear scalar product only, with no norm and no metric (a timelike vector has negative norm_squared, and null vectors give distinct points at zero separation). Minkowski spacetime is Coords<R, 4, 1>.

M is expected in 0..=N; values M > N are safe but redundant, behaving identically to M = N (fully negative-definite), since the scalar product only ranges over the N present coordinates.

Β§Trait scoping

The definite (M = 0) case implements InnerProduct, Metric, and Euclidean; the general case implements Sesquilinear and, in cases where the fixed field is itself, Bilinear

Tuple FieldsΒ§

Β§0: [F; N]

Methods from Deref<Target = [F; N]>Β§

1.57.0 Β· Source

pub fn as_slice(&self) -> &[T]

Returns a slice containing the entire array. Equivalent to &s[..].

1.57.0 Β· Source

pub fn as_mut_slice(&mut self) -> &mut [T]

Returns a mutable slice containing the entire array. Equivalent to &mut s[..].

1.77.0 Β· Source

pub fn each_ref(&self) -> [&T; N]

Borrows each element and returns an array of references with the same size as self.

Β§Example
let floats = [3.1, 2.7, -1.0];
let float_refs: [&f64; 3] = floats.each_ref();
assert_eq!(float_refs, [&3.1, &2.7, &-1.0]);

This method is particularly useful if combined with other methods, like map. This way, you can avoid moving the original array if its elements are not Copy.

let strings = ["Ferris".to_string(), "β™₯".to_string(), "Rust".to_string()];
let is_ascii = strings.each_ref().map(|s| s.is_ascii());
assert_eq!(is_ascii, [true, false, true]);

// We can still access the original array: it has not been moved.
assert_eq!(strings.len(), 3);
1.77.0 Β· Source

pub fn each_mut(&mut self) -> [&mut T; N]

Borrows each element mutably and returns an array of mutable references with the same size as self.

Β§Example

let mut floats = [3.1, 2.7, -1.0];
let float_refs: [&mut f64; 3] = floats.each_mut();
*float_refs[0] = 0.0;
assert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]);
assert_eq!(floats, [0.0, 2.7, -1.0]);
Source

pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])

πŸ”¬This is a nightly-only experimental API. (split_array)

Divides one array reference into two at an index.

The first will contain all indices from [0, M) (excluding the index M itself) and the second will contain all indices from [M, N) (excluding the index N itself).

Β§Panics

Panics if M > N.

Β§Examples
#![feature(split_array)]

let v = [1, 2, 3, 4, 5, 6];

{
   let (left, right) = v.split_array_ref::<0>();
   assert_eq!(left, &[]);
   assert_eq!(right, &[1, 2, 3, 4, 5, 6]);
}

{
    let (left, right) = v.split_array_ref::<2>();
    assert_eq!(left, &[1, 2]);
    assert_eq!(right, &[3, 4, 5, 6]);
}

{
    let (left, right) = v.split_array_ref::<6>();
    assert_eq!(left, &[1, 2, 3, 4, 5, 6]);
    assert_eq!(right, &[]);
}
Source

pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T])

πŸ”¬This is a nightly-only experimental API. (split_array)

Divides one mutable array reference into two at an index.

The first will contain all indices from [0, M) (excluding the index M itself) and the second will contain all indices from [M, N) (excluding the index N itself).

Β§Panics

Panics if M > N.

Β§Examples
#![feature(split_array)]

let mut v = [1, 0, 3, 0, 5, 6];
let (left, right) = v.split_array_mut::<2>();
assert_eq!(left, &mut [1, 0][..]);
assert_eq!(right, &mut [3, 0, 5, 6]);
left[1] = 2;
right[1] = 4;
assert_eq!(v, [1, 2, 3, 4, 5, 6]);
Source

pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])

πŸ”¬This is a nightly-only experimental API. (split_array)

Divides one array reference into two at an index from the end.

The first will contain all indices from [0, N - M) (excluding the index N - M itself) and the second will contain all indices from [N - M, N) (excluding the index N itself).

Β§Panics

Panics if M > N.

Β§Examples
#![feature(split_array)]

let v = [1, 2, 3, 4, 5, 6];

{
   let (left, right) = v.rsplit_array_ref::<0>();
   assert_eq!(left, &[1, 2, 3, 4, 5, 6]);
   assert_eq!(right, &[]);
}

{
    let (left, right) = v.rsplit_array_ref::<2>();
    assert_eq!(left, &[1, 2, 3, 4]);
    assert_eq!(right, &[5, 6]);
}

{
    let (left, right) = v.rsplit_array_ref::<6>();
    assert_eq!(left, &[]);
    assert_eq!(right, &[1, 2, 3, 4, 5, 6]);
}
Source

pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M])

πŸ”¬This is a nightly-only experimental API. (split_array)

Divides one mutable array reference into two at an index from the end.

The first will contain all indices from [0, N - M) (excluding the index N - M itself) and the second will contain all indices from [N - M, N) (excluding the index N itself).

Β§Panics

Panics if M > N.

Β§Examples
#![feature(split_array)]

let mut v = [1, 0, 3, 0, 5, 6];
let (left, right) = v.rsplit_array_mut::<4>();
assert_eq!(left, &mut [1, 0]);
assert_eq!(right, &mut [3, 0, 5, 6][..]);
left[1] = 2;
right[1] = 4;
assert_eq!(v, [1, 2, 3, 4, 5, 6]);

Trait ImplementationsΒ§

SourceΒ§

impl<F: Field, const N: usize, const M: usize> Add for Coords<F, N, M>

SourceΒ§

type Output = Coords<F, N, M>

The resulting type after applying the + operator.
SourceΒ§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
SourceΒ§

impl<F: Field, const N: usize, const M: usize> AsMut<[F; N]> for Coords<F, N, M>

SourceΒ§

fn as_mut(&mut self) -> &mut [F; N]

Converts this type into a mutable reference of the (usually inferred) input type.
SourceΒ§

impl<F: Field, const N: usize, const M: usize> AsRef<[F; N]> for Coords<F, N, M>

SourceΒ§

fn as_ref(&self) -> &[F; N]

Converts this type into a shared reference of the (usually inferred) input type.
SourceΒ§

impl Bounded<So3<Coords<R64, 3>>, So3<Coords<R64, 3>>, Coords<R64, 3>> for So3Cover

Radius of the geodesic-ball domains of So3Cover.

The 60 nodes are the icosahedral rotation group I β‰… Aβ‚… βŠ‚ SO(3) β€” the image of the 120 icosian unit quaternions (the vertices of the 600-cell) under the double cover SΒ³ β†’ SO(3). In the bi-invariant metric d = |identity_log| (half the rotation angle; diameter Ο€/2), the pairwise distances realised between nodes are exactly

  Ο€/5 β‰ˆ 0.628,   Ο€/3 β‰ˆ 1.047,   2Ο€/5 β‰ˆ 1.257,   Ο€/2 β‰ˆ 1.571

and the covering radius of the node set is β‰ˆ 0.3857 (the circumradius of a cell of the 600-cell). The radius ρ = 0.42 is chosen so that:

  • covering: ρ > 0.3857, so the 60 open balls cover SO(3);
  • goodness: ρ < Ο€/4, the convexity radius of SO(3) β‰… RPΒ³, so every ball is geodesically convex and all intersections of balls are convex, hence contractible or empty β€” an open good cover;
  • faithful 1-skeleton: two equal balls overlap iff their centres are closer than 2ρ = 0.84, which separates Ο€/5 from Ο€/3 with a wide margin on both sides β€” the nerve’s edges are exactly the 600-cell’s edges (mod Β±1), and the computation is robust to floating-point error;
  • faithful 2-skeleton: every triangle of the overlap graph is an equilateral triangle of side Ο€/5 with spherical circumradius β‰ˆ 0.365 < ρ, so all three balls genuinely share a point β€” mutual pairwise overlap coincides with triple intersection, and the triangles of the nerve are exactly the 600-cell’s 2-faces (mod Β±1).

The nerve of this cover is therefore the hemi-600-cell: the classical vertex-transitive 60-vertex triangulation of RPΒ³ with f-vector (60, 360, 600, 300), obtained from the boundary complex of the 600-cell by identifying antipodes. By the nerve theorem the nerve is homotopy equivalent to SO(3), and π₁ computed from its 2-skeleton is ⟨x | x²⟩ β‰… Z/2Z.

SourceΒ§

fn sdf(&self, v: &Coords<R64, 3>) -> R64

SourceΒ§

impl Bounded<UnitComplex<Coords<R64, 1>>, UnitComplex<Coords<R64, 1>>, Coords<R64, 1>> for S1Cover

SourceΒ§

fn sdf(&self, v: &Coords<R64, 1>) -> R64

SourceΒ§

impl Chart<So3<Coords<R64, 3>>, Coords<R64, 3>> for So3Cover

SourceΒ§

type Global = So3<Coords<R64, 3>>

The result of mapping local coordinates back onto the manifold. Read more
SourceΒ§

fn to_local(&self, point: &So3<Coords<R64, 3>>) -> Option<Coords<R64, 3>>

SourceΒ§

fn to_global(&self, coord: Coords<R64, 3>) -> So3<Coords<R64, 3>>

SourceΒ§

fn chart_at(p: &So3<Coords<R64, 3>>) -> Self

SourceΒ§

fn local_distance(&self, other: &P) -> Option<<V::F as Field>::Fixed>
where V: Euclidean,

Calculates the distance between self and other in local coordinates, based at &self.
SourceΒ§

fn check_local_inverse(p: &P) -> bool
where P: PartialEq,

SourceΒ§

impl Chart<UnitComplex<Coords<R64, 1>>, Coords<R64, 1>> for S1Cover

SourceΒ§

type Global = <UnitComplex<Coords<R64, 1>> as Chart<UnitComplex<Coords<R64, 1>>, Coords<R64, 1>>>::Global

The result of mapping local coordinates back onto the manifold. Read more
SourceΒ§

fn to_local(&self, p: &UnitComplex<Coords<R64, 1>>) -> Option<Coords<R64, 1>>

SourceΒ§

fn to_global(&self, c: Coords<R64, 1>) -> Self::Global

SourceΒ§

fn chart_at(p: &UnitComplex<Coords<R64, 1>>) -> Self

SourceΒ§

fn local_distance(&self, other: &P) -> Option<<V::F as Field>::Fixed>
where V: Euclidean,

Calculates the distance between self and other in local coordinates, based at &self.
SourceΒ§

fn check_local_inverse(p: &P) -> bool
where P: PartialEq,

SourceΒ§

impl<F: Clone + Field, const N: usize, const M: usize> Clone for Coords<F, N, M>

SourceΒ§

fn clone(&self) -> Coords<F, N, M>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) Β· SourceΒ§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
SourceΒ§

impl<F: Field + ConstZero, const N: usize, const M: usize> ConstZero for Coords<F, N, M>

SourceΒ§

const ZERO: Self

The additive identity element of Self, 0.
SourceΒ§

impl<F: Copy + Field, const N: usize, const M: usize> Copy for Coords<F, N, M>

SourceΒ§

impl<F: Debug + Field, const N: usize, const M: usize> Debug for Coords<F, N, M>

SourceΒ§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
SourceΒ§

impl<F: Field, const N: usize, const M: usize> Deref for Coords<F, N, M>

SourceΒ§

type Target = [F; N]

The resulting type after dereferencing.
SourceΒ§

fn deref(&self) -> &Self::Target

Dereferences the value.
SourceΒ§

impl<F: Field, const N: usize, const M: usize> DerefMut for Coords<F, N, M>

SourceΒ§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
SourceΒ§

impl<R: Real, const N: usize> Euclidean for Coords<R, N, 0>

SourceΒ§

fn check_pythagorean(a: &Self, b: &Self) -> bool

SourceΒ§

impl ExpMap<So3<Coords<R64, 3>>, Coords<R64, 3>> for So3Cover

SourceΒ§

fn base_point(&self) -> P

SourceΒ§

fn check_base_point_is_origin(&self) -> bool
where V: Form,

SourceΒ§

fn check_preservation_of_origin(&self) -> bool
where V: Form,

SourceΒ§

fn check_chart_at_base_point(&self) -> bool
where V: Form,

If a chart centred at p exists, chart_at(p) returns it. Formally: chart_at(p).base_point() == p whenever p is the base point of some valid chart in this atlas. Read more
SourceΒ§

impl ExpMap<UnitComplex<Coords<R64, 1>>, Coords<R64, 1>> for S1Cover

SourceΒ§

fn base_point(&self) -> UnitComplex<Coords<R64, 1>>

SourceΒ§

fn check_base_point_is_origin(&self) -> bool
where V: Form,

SourceΒ§

fn check_preservation_of_origin(&self) -> bool
where V: Form,

SourceΒ§

fn check_chart_at_base_point(&self) -> bool
where V: Form,

If a chart centred at p exists, chart_at(p) returns it. Formally: chart_at(p).base_point() == p whenever p is the base point of some valid chart in this atlas. Read more
SourceΒ§

impl<R: Field, const N: usize, const M: usize> Form for Coords<R, N, M>

SourceΒ§

fn flat(&self) -> Dual<Self>

SourceΒ§

fn dot(&self, b: &Self) -> Self::F

SourceΒ§

fn self_dot(&self) -> Self::F

SourceΒ§

fn check_dot_agrees_with_pairing(a: &Self, b: &Self) -> bool

SourceΒ§

fn check_translation_invariance(a: &Self, b: &Self, c: &Self) -> bool

SourceΒ§

impl<R: Field, const N: usize, const M: usize> FormLift for Coords<R, N, M>

SourceΒ§

fn jet_flat_array<π’ž: Cat, S: Field, const K: usize>( value: &<Self as Tensor>::Array<Jet<π’ž, S, K>>, ) -> <Dual<Self> as Tensor>::Array<Jet<π’ž, S, K>>
where Jet<π’ž, S, K>: Field,

Applies the lifted lowering map to raw coordinate arrays.
SourceΒ§

fn jet_flat<π’ž: Cat, S: Field, const N: usize>( value: &JetVector<π’ž, Self, N, S>, ) -> Dual<JetVector<π’ž, Self, N, S>>
where Jet<π’ž, S, N>: Field, JetVector<π’ž, Self, N, S>: Tensor<F = Jet<π’ž, S, N>>,

Applies the lifted lowering map to a JetVector.
SourceΒ§

impl<F: CField<Characteristic = NatZero>, const N: usize, const D: usize> From<Coords<F, D>> for SlAlgebra<F, N, D>

SourceΒ§

fn from(value: Coords<F, D>) -> Self

Converts to this type from the input type.
SourceΒ§

impl<F: Field, const N: usize, const M: usize> From<Coords<F, N, M>> for [F; N]

SourceΒ§

fn from(c: Coords<F, N, M>) -> Self

Converts to this type from the input type.
SourceΒ§

impl<R: Real> From<Coords<R, 2>> for Complex<R>

SourceΒ§

fn from(value: Coords<R, 2, 0>) -> Self

Converts to this type from the input type.
SourceΒ§

impl<R: Real> From<Coords<R, 4>> for Quaternion<R>

SourceΒ§

fn from(value: Coords<R, 4, 0>) -> Self

Converts to this type from the input type.
SourceΒ§

impl<F: Field> From<F> for Coords<F, 1>

SourceΒ§

fn from(value: F) -> Self

Converts to this type from the input type.
SourceΒ§

impl<F: Field, const N: usize, const M: usize> From<[F; N]> for Coords<F, N, M>

SourceΒ§

fn from(arr: [F; N]) -> Self

Converts to this type from the input type.
SourceΒ§

impl<const R: usize, F: Field, const N: usize, const M: usize> Index<[usize; R]> for Coords<F, N, M>
where Coords<F, N, M>: Tensor,

SourceΒ§

type Output = <Coords<F, N, M> as Tensor>::F

The returned type after indexing.
SourceΒ§

fn index(&self, index: [usize; R]) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
SourceΒ§

impl<F: Field, const N: usize, const M: usize> Index<usize> for Coords<F, N, M>

SourceΒ§

type Output = <Coords<F, N, M> as Tensor>::F

The returned type after indexing.
SourceΒ§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
SourceΒ§

impl<const R: usize, F: Field, const N: usize, const M: usize> IndexMut<[usize; R]> for Coords<F, N, M>
where Coords<F, N, M>: Tensor,

SourceΒ§

fn index_mut(&mut self, index: [usize; R]) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
SourceΒ§

impl<F: Field, const N: usize, const M: usize> IndexMut<usize> for Coords<F, N, M>

SourceΒ§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
SourceΒ§

impl<R: Real, F: Field<Fixed = R>, const N: usize, const M: usize> Interval for Coords<F, N, M>

SourceΒ§

type R = R

The ordered field the interval is valued in β€” the real field where magnitudes, distances, and convergence live. Distinct from a scalar field’s involution Fixed: analysis happens here regardless of the algebraic involution.
SourceΒ§

fn interval_squared(&self, other: &Self) -> R

The signed squared interval sΒ²(a, b) β€” the primitive from which interval (its signed square root) and distance both derive. Read more
SourceΒ§

fn interval(&self, other: &Self) -> Complex<Self::R>

Interval between self and other. Real or imaginary carries causal character.
SourceΒ§

fn check_interval_symmetry(a: Self, b: Self) -> bool

SourceΒ§

fn check_self_interval_zero(a: Self) -> bool

SourceΒ§

fn check_interval_squared_agrees_with_interval(a: &Self, b: &Self) -> bool

SourceΒ§

impl<R: Real> LieGroup<Coords<R, 2>> for Complex<R>

SourceΒ§

fn identity_exp(v: Coords<R, 2>) -> Self

SourceΒ§

fn identity_log(p: &Self) -> Option<Coords<R, 2>>

SourceΒ§

impl<R: Real> LieGroup<Coords<R, 2>> for NonZero<Complex<R>>

SourceΒ§

fn identity_exp(v: Coords<R, 2>) -> Self

SourceΒ§

fn identity_log(p: &Self) -> Option<Coords<R, 2>>

SourceΒ§

impl<R: Real> LieGroup<Coords<R, 4>> for Quaternion<R>

SourceΒ§

fn identity_exp(v: Coords<R, 4>) -> Self

SourceΒ§

fn identity_log(p: &Self) -> Option<Coords<R, 4>>

SourceΒ§

impl<R: Field + Real, const N: usize> Metric for Coords<R, N, 0>

SourceΒ§

fn distance(&self, other: &Self) -> R

SourceΒ§

fn check_non_negative(a: Self, b: Self) -> bool

SourceΒ§

fn check_distance_agrees_with_interval(a: Self, b: Self) -> bool

SourceΒ§

impl<F: Field, const N: usize, const M: usize> Mul<<Coords<F, N, M> as Tensor>::F> for Coords<F, N, M>
where Coords<F, N, M>: Tensor<Action: ActionExists>,

SourceΒ§

type Output = Coords<F, N, M>

The resulting type after applying the * operator.
SourceΒ§

fn mul(self, scalar: <Coords<F, N, M> as Tensor>::F) -> Self::Output

Performs the * operation. Read more
SourceΒ§

impl<F: Field, const N: usize, const M: usize> Neg for Coords<F, N, M>

SourceΒ§

type Output = Coords<F, N, M>

The resulting type after applying the - operator.
SourceΒ§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
SourceΒ§

impl NerveComplexParameters<So3<Coords<R64, 3>>, Coords<R64, 3>, So3<Coords<R64, 3>>, So3Cover> for So3Cover

SourceΒ§

fn overestimation_bound() -> Option<(V::F, V::F)>

The one irreducible assumption: graph distance on the 1-skeleton overestimates true geodesic distance by at most a factor 1 + e. Read more
SourceΒ§

fn max_candidate_paths() -> usize

Hard cap on how many candidate edge-paths are straightened. Raising it strengthens the guarantee; lowering it trades certification for speed.
SourceΒ§

fn max_frontier() -> usize

Cap on heap entries. Prefixes vastly outnumber completions, and this is the quantity that threatens memory. Independent of the above: no ratio between prefixes-in-flight and completions exists.
SourceΒ§

fn max_rescues() -> usize

Cap on local insertions before declaring the charts unusable. when flowing a polyline, sometimes a point might go out of the injectivity radius of its neighbors, in that case, we insert a point between them to try to rescue the polyline.
SourceΒ§

fn max_straightening_iterations(n: usize) -> usize

Iteration cap for the flow, as a function of vertex count. Read more
SourceΒ§

fn max_samples() -> usize

Cap on samples per same_basin comparison. Exceeding it means the polyline is longer than max_samples Β· Ξ΄_s, and no comparison at that spacing could prove two prefixes share a basin β€” so the prune is declined rather than performed on insufficient evidence.
SourceΒ§

fn max_canonical_generators() -> usize

Generator count above which fundamental_group returns a correct but non-canonical presentation. Read more
SourceΒ§

fn prefix_smoothing_sweeps() -> usize

Sweeps of the discrete geodesic flow applied to a prefix before it is compared for basin membership. Read more
SourceΒ§

fn max_basins_per_class() -> usize

SourceΒ§

fn get_neighbors(i: usize) -> impl Iterator<Item = usize>

Returns the indices of nodes whose bounded domains overlap the bounded domain of this node β€” the 1-skeleton of the nerve. Read more
SourceΒ§

impl NerveComplexParameters<UnitComplex<Coords<R64, 1>>, Coords<R64, 1>, UnitComplex<Coords<R64, 1>>, S1Cover> for S1Cover

SourceΒ§

fn overestimation_bound() -> Option<(V::F, V::F)>

The one irreducible assumption: graph distance on the 1-skeleton overestimates true geodesic distance by at most a factor 1 + e. Read more
SourceΒ§

fn max_candidate_paths() -> usize

Hard cap on how many candidate edge-paths are straightened. Raising it strengthens the guarantee; lowering it trades certification for speed.
SourceΒ§

fn max_frontier() -> usize

Cap on heap entries. Prefixes vastly outnumber completions, and this is the quantity that threatens memory. Independent of the above: no ratio between prefixes-in-flight and completions exists.
SourceΒ§

fn max_rescues() -> usize

Cap on local insertions before declaring the charts unusable. when flowing a polyline, sometimes a point might go out of the injectivity radius of its neighbors, in that case, we insert a point between them to try to rescue the polyline.
SourceΒ§

fn max_straightening_iterations(n: usize) -> usize

Iteration cap for the flow, as a function of vertex count. Read more
SourceΒ§

fn max_samples() -> usize

Cap on samples per same_basin comparison. Exceeding it means the polyline is longer than max_samples Β· Ξ΄_s, and no comparison at that spacing could prove two prefixes share a basin β€” so the prune is declined rather than performed on insufficient evidence.
SourceΒ§

fn max_canonical_generators() -> usize

Generator count above which fundamental_group returns a correct but non-canonical presentation. Read more
SourceΒ§

fn prefix_smoothing_sweeps() -> usize

Sweeps of the discrete geodesic flow applied to a prefix before it is compared for basin membership. Read more
SourceΒ§

fn max_basins_per_class() -> usize

SourceΒ§

fn get_neighbors(i: usize) -> impl Iterator<Item = usize>

Returns the indices of nodes whose bounded domains overlap the bounded domain of this node β€” the 1-skeleton of the nerve. Read more
SourceΒ§

impl<R: Field, const N: usize, const M: usize> Nondegenerate for Coords<R, N, M>

SourceΒ§

fn sharp(v: Dual<Self>) -> Self

SourceΒ§

fn check_isomorphism(a: &Self) -> bool
where Self: PartialEq<Self>,

SourceΒ§

impl<R: Field, const N: usize, const M: usize> NondegenerateLift for Coords<R, N, M>

SourceΒ§

fn jet_sharp_array<π’ž: Cat, S: Field, const K: usize>( value: &<Dual<Self> as Tensor>::Array<Jet<π’ž, S, K>>, ) -> <Self as Tensor>::Array<Jet<π’ž, S, K>>
where Jet<π’ž, S, K>: Field,

Applies the lifted raising map to raw coordinate arrays.
SourceΒ§

fn jet_sharp<π’ž: Cat, S: Field, const N: usize>( value: Dual<JetVector<π’ž, Self, N, S>>, ) -> JetVector<π’ž, Self, N, S>
where Jet<π’ž, S, N>: Field, JetVector<π’ž, Self, N, S>: Tensor<F = Jet<π’ž, S, N>>,

Applies the lifted raising map to a jet-valued covector.
SourceΒ§

impl<F: Field, const N: usize, const M: usize> PartialEq for Coords<F, N, M>

SourceΒ§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) Β· SourceΒ§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
SourceΒ§

impl<F: Field, const N: usize, const M: usize> Sesquilinear for Coords<F, N, M>

SourceΒ§

fn norm_squared(&self) -> <Self::F as Field>::Fixed

SourceΒ§

fn check_hermitian_symmetry(a: Self, b: Self) -> bool

SourceΒ§

fn check_additivity(a: Self, b: Self, c: Self) -> bool

SourceΒ§

fn check_scalar_linearity(a: Self, c: Self, k: Self::F) -> bool

SourceΒ§

impl<F: Field, const N: usize, const M: usize> Sub for Coords<F, N, M>

SourceΒ§

type Output = Coords<F, N, M>

The resulting type after applying the - operator.
SourceΒ§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
SourceΒ§

impl TangentBundle<So3<Coords<R64, 3>>, Coords<R64, 3>> for So3Cover

SourceΒ§

impl TangentBundle<UnitComplex<Coords<R64, 1>>, Coords<R64, 1>> for S1Cover

SourceΒ§

impl<F: Field, const N: usize, const M: usize> Tensor for Coords<F, N, M>

SourceΒ§

type F = F

The scalar field the coordinates live in.
SourceΒ§

type Hand = Right

The side on which F acts. Dual<Self> elects the opposite hand, and Dual<Dual<Self>> therefore restores this one.
SourceΒ§

type Action = BothSided

Whether Self has a one-sided or both-sided action.
SourceΒ§

type Normalization = Atomic

Selects how this constructor participates in tensor normalization. Ordinary tensor spaces use Atomic; expression constructors provide their corresponding structural normalizer.
SourceΒ§

type Array<T: Point> = [T; N]

The underlying storage of this tensor; generic over any point.
SourceΒ§

fn from_fn(f: impl FnMut(usize) -> Self::F) -> Self

Builds a vector from a function of coordinate index. The canonical constructor β€” most other constructors reduce to this.
SourceΒ§

const N: usize = <Self::Array<Self::F>>::N

The dimension of the space β€” the number of coordinates.
SourceΒ§

fn iter(&self) -> <Self::Array<Self::F> as Array<Self::F>>::Iter<'_>

Iterates the N coordinates in order.
SourceΒ§

fn map(&self, f: impl FnMut(Self::F) -> Self::F) -> Self

Applies f to each coordinate of V
SourceΒ§

fn pairing(&self, rhs: &Dual<Self>) -> Self::F

The canonical evaluation pairing (V, V*) -> F, ⟨v, Ο‰βŸ© = Ο‰(v). Read more
SourceΒ§

fn from_iter(iter: impl IntoIterator<Item = Self::F>) -> Self

Constructs a tensor from its coordinates in canonical flat-index order. Read more
SourceΒ§

fn flatten_index<const R: usize>(index: [usize; R]) -> usize

SourceΒ§

fn check_global_chart(p: &Self, q: &Self) -> bool

SourceΒ§

fn check_global_geodesic_scaling( p: &Self, v: Self, t: <Self::F as Field>::Fixed, ) -> bool
where Self: Vector + PartialEq,

SourceΒ§

impl<F: Field, const N: usize, const M: usize> Zero for Coords<F, N, M>

SourceΒ§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
SourceΒ§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
SourceΒ§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
SourceΒ§

impl<F: Field, const N: usize, const M: usize> ΞΉ for Coords<F, N, M>

SourceΒ§

type C = ReflectedContext<π’ž, Coords<F, N, M>>

Auto Trait ImplementationsΒ§

Β§

impl<F, const N: usize, const M: usize> Freeze for Coords<F, N, M>
where [F; N]: Freeze,

Β§

impl<F, const N: usize, const M: usize> RefUnwindSafe for Coords<F, N, M>

Β§

impl<F, const N: usize, const M: usize> Send for Coords<F, N, M>
where [F; N]: Send,

Β§

impl<F, const N: usize, const M: usize> Sync for Coords<F, N, M>
where [F; N]: Sync,

Β§

impl<F, const N: usize, const M: usize> Unpin for Coords<F, N, M>
where [F; N]: Unpin,

Β§

impl<F, const N: usize, const M: usize> UnsafeUnpin for Coords<F, N, M>

Β§

impl<F, const N: usize, const M: usize> UnwindSafe for Coords<F, N, M>

Blanket ImplementationsΒ§

SourceΒ§

impl<T> Any for T
where T: 'static + ?Sized,

SourceΒ§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
SourceΒ§

impl<F, V> Bilinear for V
where F: Field<Fixed = F>, V: Sesquilinear<F = F>,

SourceΒ§

impl<T> Borrow<T> for T
where T: ?Sized,

SourceΒ§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
SourceΒ§

impl<T> BorrowMut<T> for T
where T: ?Sized,

SourceΒ§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
SourceΒ§

impl<G> CGroup for G
where G: Sub<Output = G> + Neg<Output = G> + CMonoid,

SourceΒ§

fn check_left_inverse(&self) -> bool
where Self: PartialEq,

SourceΒ§

fn check_right_inverse(&self) -> bool
where Self: PartialEq,

SourceΒ§

fn check_sub_agrees_with_neg(a: &Self, b: &Self) -> bool
where Self: PartialEq,

SourceΒ§

impl<M> CMonoid for M
where M: Point + Zero,

SourceΒ§

fn check_left_identity(&self) -> bool
where Self: PartialEq,

SourceΒ§

fn check_right_identity(&self) -> bool
where Self: PartialEq,

SourceΒ§

fn check_associativity(a: Self, b: Self, c: Self) -> bool
where Self: PartialEq,

SourceΒ§

fn check_commutativity(a: Self, b: Self) -> bool
where Self: PartialEq,

SourceΒ§

impl<V, S> Chart<S, V> for S
where V: Tensor, S: Smooth<V>,

SourceΒ§

type Global = <S as Smooth<V>>::Global

The result of mapping local coordinates back onto the manifold. Read more
SourceΒ§

fn to_local(&self, point: &S) -> Option<V>

SourceΒ§

fn to_global(&self, coord: V) -> <S as Smooth<V>>::Global

SourceΒ§

fn chart_at(p: &S) -> S

SourceΒ§

fn local_distance(&self, other: &P) -> Option<<V::F as Field>::Fixed>
where V: Euclidean,

Calculates the distance between self and other in local coordinates, based at &self.
SourceΒ§

fn check_local_inverse(p: &P) -> bool
where P: PartialEq,

SourceΒ§

impl<T> CloneToUninit for T
where T: Clone,

SourceΒ§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

πŸ”¬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
SourceΒ§

impl<V> Connection<V, V> for V
where V: Tensor,

SourceΒ§

fn tangent_to_local<const N: usize>( base: TangentElement<V, V, Ø, N>, local: TangentElement<V, V, Ø, N>, ) -> Option<TensorOver<V, Jet<π’ž, <V as Tensor>::F, N>>>

Expresses local in the lifted chart centred at base.
SourceΒ§

fn tangent_to_global<const N: usize>( base: TangentElement<V, V, Ø, N>, coordinate: TensorOver<V, Jet<π’ž, <V as Tensor>::F, N>>, ) -> (V, TensorOver<V, Jet<π’ž, <V as Tensor>::F, N>>)

Reconstructs a global point and tangent jet from a lifted coordinate.
SourceΒ§

fn geodesic_acceleration(&self, p: P, v: V) -> Option<V>
where Self: Sized, V: Vector,

Returns the coordinate acceleration at p of the geodesic with initial tangent v, expressed in the fixed chart self. Read more
SourceΒ§

fn check_quadratic_geodesic_acceleration( &self, p: P, u: V, v: V, a: V::F, ) -> bool
where Self: Sized, V: Vector + PartialEq,

Certifies that the geodesic spray is quadratic in tangent velocity. Read more
SourceΒ§

impl<T> Contract for T
where T: Tensor,

SourceΒ§

fn contract<P>( self, ) -> <<Self as ContractKernel<P>>::Shape as NormalizedContractionShape<Self::F>>::Output
where Self: ContractKernel<P>, <Self as ContractKernel<P>>::Shape: NormalizedContractionShape<Self::F>,

SourceΒ§

impl<π’ž, X> Equivalent<π’ž, X> for X
where π’ž: Cat,

SourceΒ§

fn project(self) -> X

SourceΒ§

fn lift(x: X) -> X

SourceΒ§

impl<V, L> ExpMap<L, V> for L
where V: Tensor, L: Smooth<V>,

SourceΒ§

fn base_point(&self) -> L

SourceΒ§

fn check_base_point_is_origin(&self) -> bool
where V: Form,

SourceΒ§

fn check_preservation_of_origin(&self) -> bool
where V: Form,

SourceΒ§

fn check_chart_at_base_point(&self) -> bool
where V: Form,

If a chart centred at p exists, chart_at(p) returns it. Formally: chart_at(p).base_point() == p whenever p is the base point of some valid chart in this atlas. Read more
SourceΒ§

impl<T> From<T> for T

SourceΒ§

fn from(t: T) -> T

Returns the argument unchanged.

SourceΒ§

impl<V> Group for V
where V: Tensor,

SourceΒ§

fn identity() -> V

SourceΒ§

fn compose(&self, other: &V) -> V

SourceΒ§

fn inverse(&self) -> V

SourceΒ§

fn check_left_identity(&self) -> bool
where Self: PartialEq,

SourceΒ§

fn check_right_identity(&self) -> bool
where Self: PartialEq,

SourceΒ§

fn check_associativity(a: Self, b: Self, c: Self) -> bool
where Self: PartialEq,

SourceΒ§

fn check_left_inverse(&self) -> bool
where Self: PartialEq + Debug,

SourceΒ§

fn check_right_inverse(&self) -> bool
where Self: PartialEq,

SourceΒ§

impl<I, V> ICompatible<V> for I
where I: Euclidean + From<[<I as Tensor>::F; 1]> + From<[<V as Tensor>::F; 1]> + 'static + Send + Sync, <I as Tensor>::F: Real + From<<V as Tensor>::F>, V: Euclidean + From<[<I as Tensor>::F; 2]> + 'static + Send + Sync, <V as Tensor>::F: Real + Send + Sync,

SourceΒ§

impl<P> InnerProduct for P
where P: Sesquilinear + Nondegenerate + Metric<R = <<P as Tensor>::F as Field>::Fixed>, <<P as Tensor>::F as Field>::Fixed: Real,

SourceΒ§

fn norm(&self) -> <Self::F as Field>::Fixed

The norm β€–vβ€– = sqrt(⟨v,v⟩). Well-defined and real because the form is positive-definite. On an indefinite Bilinear space this would not be real β€” which is why it lives here, not on the base.
SourceΒ§

fn check_positive_definite(a: Self) -> bool
where Self: Zero + PartialEq,

SourceΒ§

fn check_metric_compatibility(a: Self, b: Self) -> bool

SourceΒ§

impl<T, U> Into<U> for T
where U: From<T>,

SourceΒ§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

SourceΒ§

impl<V> LieGroup<V> for V
where V: Tensor,

SourceΒ§

impl<T> Normalize for T
where T: Tensor + NormalizeWith<Undecorated>,

SourceΒ§

fn normalize(self) -> <Self as NormalizeWith<Undecorated>>::Normalized

SourceΒ§

impl<X, C> Ob<C> for X
where X: ι, C: Category + 'static, <X as ι>::C: RootContext<X = X> + ⱡ<𝐈𝐝<C>>,

SourceΒ§

type Context = <X as ΞΉ>::C

The contextual witness used to admit Self as an object of C. Read more
SourceΒ§

impl<T> OptionallyOption<T> for T

SourceΒ§

fn into_option(self) -> Option<T>

Converts either permitted representation into Option<T>. Read more
SourceΒ§

impl<T> Point for T
where T: Clone + Debug,

SourceΒ§

impl<V, E> PseudoRiemannian<V> for E
where V: Bilinear, <V as Tensor>::F: Real, E: ExpMap<E, V> + Interval<R = <V as Tensor>::F>,

SourceΒ§

fn check_isometry(&self, v: V) -> bool

SourceΒ§

impl<T> Reassociate for T

SourceΒ§

fn reassociate<P>( self, ) -> <<Self as ReassociateKernel<P>>::Reassociated as NormalizeWith<Undecorated>>::Normalized
where Self: ReassociateKernel<P>, <Self as ReassociateKernel<P>>::Reassociated: NormalizeWith<Undecorated>,

SourceΒ§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

SourceΒ§

type Target = T

πŸ”¬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
SourceΒ§

impl<T> Reflect<π’ž> for T
where T: Tensor,

SourceΒ§

type Body = 𝒯<ː<Binds<F, π’ž, <T as Tensor>::F, ReflectedContext<π’ž, <T as Tensor>::F>>, Ø>, ː<π’ž, Ø>>

The elaborated structural graph behind this interpretation. Read more
SourceΒ§

impl<V> Reflect<π’ž> for V
where V: Vector,

SourceΒ§

type Body = 𝒯<Ø, ː<BindsProperty<π’ž, ReflectedContext<π’ž, V>>, ː<π’ž, Ø>>>

The elaborated structural graph behind this interpretation. Read more
SourceΒ§

impl<V, L> Smooth<V> for L
where V: Tensor, L: LieGroup<V>,

SourceΒ§

type Global = L

The result of applying the exponential map. Read more
SourceΒ§

fn exp(&self, coord: V) -> L

The exponential map at self: sends a tangent vector v to the point reached by following the geodesic from self in direction v for unit time.
SourceΒ§

fn log(&self, point: &L) -> Option<V>

The logarithmic map at self: recovers the tangent vector whose geodesic reaches other, or None at the cut locus (e.g. the antipode on a sphere).
SourceΒ§

impl<T> Swap for T
where T: Tensor,

SourceΒ§

fn swap<P>( self, ) -> <<Self as SwapKernel<P>>::Swapped as NormalizeWith<Undecorated>>::Normalized
where Self: SwapKernel<P>, <Self as SwapKernel<P>>::Swapped: NormalizeWith<Undecorated>,

SourceΒ§

impl<V, L> TangentBundle<L, V> for L
where V: Tensor, L: Smooth<V>,

SourceΒ§

impl<T> ToOwned for T
where T: Clone,

SourceΒ§

type Owned = T

The resulting type after obtaining ownership.
SourceΒ§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
SourceΒ§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
SourceΒ§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

SourceΒ§

type Error = Infallible

The type returned in the event of a conversion error.
SourceΒ§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
SourceΒ§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

SourceΒ§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
SourceΒ§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
SourceΒ§

impl<I, V> VCompatible<I> for V
where I: Euclidean + From<[<I as Tensor>::F; 1]> + From<[<V as Tensor>::F; 1]> + 'static + Send + Sync, <I as Tensor>::F: Real + From<<V as Tensor>::F>, V: Euclidean + From<[<I as Tensor>::F; 2]> + 'static + Send + Sync, <V as Tensor>::F: Real + Send + Sync,

SourceΒ§

impl<V> Vector for V
where V: Tensor + Mul<<V as Tensor>::F, Output = V>, <V as Tensor>::Action: ActionExists,