Skip to content

geometry · Metric

4 accepted declarations. Python and Rust forms, contracts, evidence, failure boundaries, and checked usages are kept together below.

geometry.Metric

Finite metric contract consumed by Vietoris–Rips constructions.

class Metric

noether::geometry::Metric · Direct Rust declaration

pub trait Metric { // Required methods fn len(&self) -> usize; fn distance(&self, i: usize, j: usize) -> f64; // Provided methods fn is_empty(&self) -> bool { ... } fn enclosing_radius(&self) -> f64 { ... } }
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, convex-hull
GIL attached / bounded

Executable usage: validation/unit/geometry/test_geometry_facade.py:21 · validation/unit/geometry/test_geometry_facade.py:9 · validation/unit/topology/test_filtration_builders.py:32 · validation/unit/topology/test_filtration_builders.py:9

geometry.Metric.__len__

Return the number of stored items in this object.

(self) -> int

noether::geometry::Metric · Python projection

Python projection convenience over this Rust mathematical type
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, convex-hull
GIL attached / bounded

Executable usage: validation/unit/topology/test_filtration_builders.py:109 · validation/unit/topology/test_filtration_builders.py:14

geometry.Metric.distance

Compute distance for this Metric.

(self, i: int, j: int) -> float

noether::geometry::Metric · Python projection

Python projection convenience over this Rust mathematical type
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, convex-hull
GIL attached / bounded

Executable usage: validation/unit/combin/test_graph_facade.py:105 · validation/unit/combin/test_graph_facade.py:48 · validation/unit/geometry/test_geometry_facade.py:25 · validation/unit/geometry/test_geometry_facade.py:48 · validation/unit/topology/test_filtration_builders.py:100 · validation/unit/topology/test_filtration_builders.py:112

geometry.Metric.enclosing_radius

Compute enclosing radius for this Metric.

Detailed contract

The smallest t at which every point lies within t of some chosen centre — ripser’s default threshold, and a sane cap when the caller has no scale in mind. Above it the complex is a cone and every class has already died.

(self) -> float

noether::geometry::Metric::enclosing_radius · Direct Rust declaration

fn enclosing_radius(&self) -> f64
Contract Value
Guarantee checked deterministic result
Determinism deterministic
Availability default CPU build
Domain implementation crates noether, geom-core, convex-hull
GIL attached / bounded

Executable usage: validation/unit/geometry/test_geometry_facade.py:26 · validation/unit/topology/test_filtration_builders.py:115 · validation/unit/topology/test_filtration_builders.py:24