MCPcopy Create free account
hub / github.com/Incline-Developers/Incline / numeric_variable_default

Function numeric_variable_default

src/model/block_model.rs:225–234  ·  view source on GitHub ↗

A numeric variable's fixed "no value" sentinel, parsed from its BMF `global`/`default` field. Shared by the renderer's grade colouring and the UI's colour-scale legend so both treat the same blocks as unset.

(
    variable: &crate::model::formats::bmf::BmfVariable,
)

Source from the content-addressed store, hash-verified

223
224 pub(crate) fn par_for_each(&self, visit: impl Fn(usize) + Sync + Send) {
225 use rayon::prelude::*;
226 match self {
227 Self::All(len) => (0..*len).into_par_iter().for_each(&visit),
228 Self::Explicit(indices) => indices.par_iter().copied().for_each(visit),
229 }
230 }
231
232 pub(crate) fn par_filter_map_reduce<T: Send>(
233 &self,
234 identity: impl Fn() -> T + Sync + Send,
235 map: impl Fn(usize) -> Option<T> + Sync + Send,
236 reduce: impl Fn(T, T) -> T + Sync + Send,
237 ) -> T {

Callers 2

cached_variable_rangeFunction · 0.85
block_model_color_valuesFunction · 0.85

Calls 1

trimMethod · 0.80

Tested by

no test coverage detected