#[non_exhaustive]pub struct RipsParams {Show 14 fields
pub max_dim: usize,
pub threshold: Option<f64>,
pub modulus: u32,
pub threads: usize,
pub use_emergent_pairs: bool,
pub use_apparent_pairs: bool,
pub use_clearing: bool,
pub use_adjacency_rows: bool,
pub collapse_edges: bool,
pub collapse_schedule: CollapseSchedule,
pub adaptive_collapse: AdaptiveCollapseParams,
pub engine: Engine,
pub dense_storage: DenseStorage,
pub factorization: GraphFactorization,
}Expand description
Parameters for crate::rips_persistence.
The engine is dimension-generic. The differential gates cover
max_dim <= 2. Stress tests extend through dimension 4.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_dim: usizeHighest homology dimension to compute.
threshold: Option<f64>Filtration threshold. None means the input’s default: the
enclosing radius for dense matrices, no threshold for sparse ones.
modulus: u32Coefficient field Z/p; must be a prime below 32768. Default 2.
threads: usizeWorker threads for the run. 0 and 1 (the default) both run the
serial engine. Higher values reduce each dimension concurrently.
With RipsParams::collapse_edges set and the ordered or rounds
RipsParams::collapse_schedule, threads is the budget for the
whole pipeline. The diagram is identical at any thread count.
use_emergent_pairs: boolOptimization toggle. The diagram is identical with any combination disabled. For differential testing only.
use_apparent_pairs: bool§use_clearing: bool§use_adjacency_rows: boolSee RipsParams::use_emergent_pairs. With this set, and the graph
dense enough for the rows to fit their memory budget, the dim-0
apparent test runs on adjacency bitsets instead of the neighbor
lists.
collapse_edges: boolCollapse dominated edges before the engine runs. Off by default.
The diagram is identical either way. See collapse.
collapse_schedule: CollapseScheduleThe schedule the collapse uses with collapse_edges set. Default
CollapseSchedule::Serial. See CollapseSchedule.
adaptive_collapse: AdaptiveCollapseParamsObjective and deterministic work limit for
CollapseSchedule::Adaptive. Other schedules ignore this field.
engine: EngineWhich engine reduces a dense input. Default Engine::Auto. See
Engine.
dense_storage: DenseStorageWhich storage form the dense engine reduces from. Default
DenseStorage::Auto. See DenseStorage.
factorization: GraphFactorizationStructural decomposition of a sparse terminal graph. Default
GraphFactorization::Off. Dense runs use it only after routing to
the sparse engine. See GraphFactorization.
Implementations§
Source§impl RipsParams
impl RipsParams
Sourcepub fn new(max_dim: usize) -> Self
pub fn new(max_dim: usize) -> Self
Defaults with the given max_dim.
The threshold is the input’s default. Reduction shortcuts are on. Edge collapse and structural factorization are off.
Sourcepub fn with_threshold(self, threshold: f64) -> Self
pub fn with_threshold(self, threshold: f64) -> Self
Truncate the filtration at threshold.
Sourcepub fn with_modulus(self, modulus: u32) -> Self
pub fn with_modulus(self, modulus: u32) -> Self
Compute over Z/p instead of Z/2. modulus must be a prime below
32768.
Sourcepub fn with_threads(self, threads: usize) -> Self
pub fn with_threads(self, threads: usize) -> Self
Reduce with threads workers. 1 keeps the serial engine. The diagram
is identical at any thread count.
Sourcepub fn with_edge_collapse(self) -> Self
pub fn with_edge_collapse(self) -> Self
Collapse dominated edges before the engine runs. The diagram is
identical either way. See collapse.
Sourcepub fn with_collapse_schedule(self, schedule: CollapseSchedule) -> Self
pub fn with_collapse_schedule(self, schedule: CollapseSchedule) -> Self
Collapse dominated edges with the given schedule before the engine
runs. Also sets RipsParams::collapse_edges. See
CollapseSchedule.
Sourcepub fn with_adaptive_collapse(self, params: AdaptiveCollapseParams) -> Self
pub fn with_adaptive_collapse(self, params: AdaptiveCollapseParams) -> Self
Collapse with the adaptive version 3 schedule and the given objective and work limit.
Sourcepub fn with_engine(self, engine: Engine) -> Self
pub fn with_engine(self, engine: Engine) -> Self
Choose the engine for a dense input. See Engine.
Sourcepub fn with_dense_storage(self, storage: DenseStorage) -> Self
pub fn with_dense_storage(self, storage: DenseStorage) -> Self
Choose the storage form the dense engine reduces from. See
DenseStorage.
Sourcepub fn with_factorization(self, factorization: GraphFactorization) -> Self
pub fn with_factorization(self, factorization: GraphFactorization) -> Self
Choose structural factorization for sparse reduction. See
GraphFactorization.
Trait Implementations§
Source§impl Clone for RipsParams
impl Clone for RipsParams
Source§fn clone(&self) -> RipsParams
fn clone(&self) -> RipsParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RipsParams
impl Debug for RipsParams
Auto Trait Implementations§
impl Freeze for RipsParams
impl RefUnwindSafe for RipsParams
impl Send for RipsParams
impl Sync for RipsParams
impl Unpin for RipsParams
impl UnsafeUnpin for RipsParams
impl UnwindSafe for RipsParams
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<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