#[non_exhaustive]pub enum DenseStorage {
Auto,
Compact,
Square,
}Expand description
Which storage form the dense engine reduces from.
A crate::DistanceMatrix is built compact: the condensed lower triangle,
n(n-1)/2 entries. The full form holds both triangles row-major,
n * n entries, so that the cofacet diameter fold reads a contiguous
row per simplex vertex where the compact form reads a strided column.
The full form costs n(n+1)/2 entries more.
The choice is per run and comes after the routing decision, so a run
the router sends to the sparse engine never builds the full form.
Auto selects it from the compact matrix size, a frozen budget on the
added bytes, the edge count at the resolved threshold, and how many
distances the fold reads. Compact forbids the conversion, which
bounds what a run spends on the matrix. Square forces it and skips
the budget.
The conversion runs once and the full form lives only as long as the
run. The caller keeps its compact matrix, so a run in the full form
holds n * n + n(n-1)/2 entries: one and a half times the full form,
three times the compact one.
The diagram is identical under all three, bit for bit.
A sparse input holds no distance matrix, so this setting does not reach
crate::rips_persistence_sparse.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Auto
Convert to the full form when the frozen rule selects it, and keep the compact form otherwise.
Compact
Always reduce from the compact form. No run adds the second triangle.
Square
Always reduce from the full form. This is an explicit request, so
the Auto budget on the added bytes does not apply.
Trait Implementations§
Source§impl Clone for DenseStorage
impl Clone for DenseStorage
Source§fn clone(&self) -> DenseStorage
fn clone(&self) -> DenseStorage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DenseStorage
Source§impl Debug for DenseStorage
impl Debug for DenseStorage
Source§impl Default for DenseStorage
impl Default for DenseStorage
Source§fn default() -> DenseStorage
fn default() -> DenseStorage
impl Eq for DenseStorage
Source§impl PartialEq for DenseStorage
impl PartialEq for DenseStorage
impl StructuralPartialEq for DenseStorage
Auto Trait Implementations§
impl Freeze for DenseStorage
impl RefUnwindSafe for DenseStorage
impl Send for DenseStorage
impl Sync for DenseStorage
impl Unpin for DenseStorage
impl UnsafeUnpin for DenseStorage
impl UnwindSafe for DenseStorage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more