#[non_exhaustive]pub enum Strategy {
Exact,
Prefix {
depth: Option<u8>,
},
Top {
n: u32,
},
Bands {
count: u8,
},
Quantiles {
count: u8,
},
Natural {
count: u8,
},
Similar {
algorithm: SimilarAlgorithm,
},
}Expand description
Strategy applied to one axis.
§Examples
use face_core::Strategy;
assert!(Strategy::Quantiles { count: 4 }.is_buffered());
assert!(!Strategy::Exact.is_buffered());Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Exact
One cluster per distinct value (§5.3).
Prefix
Path / namespace grouping by directory depth (§5.3).
Top
Top-N by frequency plus a synthetic (other) cluster (§5.3).
Bands
Equal-width bands over the numeric range (§5.2).
Quantiles
Equal-population quantile buckets (§5.2). Buffered (§12).
Natural
One-dimensional Jenks natural breaks (§5.2). Buffered (§12).
Similar
Algorithmic free-form string clustering (§5.4). Buffered.
Fields
algorithm: SimilarAlgorithmSimilarity algorithm to use.
Implementations§
Source§impl Strategy
impl Strategy
Sourcepub fn is_buffered(&self) -> bool
pub fn is_buffered(&self) -> bool
Whether this strategy requires buffering all input before emitting clusters (§12 memory model).
Quantiles and Natural need the full distribution; everything
else can stream.
Sourcepub fn name(&self) -> &'static str
pub fn name(&self) -> &'static str
Lowercase wire-form name of this strategy, matching the serde
tag used in the §7 envelope (exact, prefix, top, bands,
quantiles, natural).
Strategy is #[non_exhaustive]; future variants added before
their dispatch arms land here will return "unknown" until the
arm is filled in.
§Examples
use face_core::Strategy;
assert_eq!(Strategy::Exact.name(), "exact");
assert_eq!(Strategy::Bands { count: 5 }.name(), "bands");