Appearance
cellpack::scans::EncodeOptions
Module contract · All interfaces
At a glance
pub struct EncodeOptions {
pub renumber: bool,
pub thresholds: Thresholds,
pub max_lanes: u8,
pub lane_min: u32,
pub column_modes: Option<f32>,
pub layout: LayoutChoice,
pub values: ValueChoice,
}Borrowed inputs, selections and encoding options. Chunk-level encoding choices.
Fields and variants
renumber
renumber: boolNumber genes by descending presence in the chunk, which concentrates gaps.
thresholds
thresholds: ThresholdsSize bounds a coded section must not exceed to be kept.
max_lanes
max_lanes: u8Upper bound on interleaved rANS states per stream: 1, 2, 4, 8, 16 or 32.
lane_min
lane_min: u32A stream of n symbols uses the most lanes l <= max_lanes with l * lane_min <= n, one lane at least, so small cells do not pay for unused states. A power of two in [1, 65536].
column_modes
Column modes: the chunk stores each gene’s most frequent value and records may code only the values that differ from it. The table is built when at least this share of the chunk’s values equal their gene’s mode and the estimated saving clearly exceeds the table; otherwise records keep per-cell dictionaries. None never builds it. Each record still chooses its smallest coding. CpkWriter builds it only for float matrices (integer counts code smaller and map faster without it) unless mode coding is forced.
layout
layout: LayoutChoiceRecord layout; anything but Auto applies to every row.
values
values: ValueChoiceValue coding; anything but Auto applies to every row and ignores the value threshold.
Implemented traits
impl Clone for EncodeOptionsimpl Debug for EncodeOptionsimpl PartialEq for EncodeOptionsContract reference
See the module reference for semantic input/output rules, units, allocation, mutation, failure behavior, and lifetime requirements. Declarations and documented members are synchronized from the crate source.