MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / tile_id_for_cell

Function tile_id_for_cell

nodedb-array/src/tile/layout.rs:73–82  ·  view source on GitHub ↗

Compute the [`TileId`] for one cell coordinate at a given system time. Non-bitemporal callers pass `system_from_ms = 0`; bitemporal writes supply the leader-stamped HLC component.

(
    schema: &ArraySchema,
    coord: &[CoordValue],
    system_from_ms: i64,
)

Source from the content-addressed store, hash-verified

71/// time. Non-bitemporal callers pass `system_from_ms = 0`; bitemporal
72/// writes supply the leader-stamped HLC component.
73pub fn tile_id_for_cell(
74 schema: &ArraySchema,
75 coord: &[CoordValue],
76 system_from_ms: i64,
77) -> ArrayResult<TileId> {
78 let tile_indices = tile_indices_for_cell(schema, coord)?;
79 let bits = bits_per_dim(schema.arity());
80 let prefix = encode_tile_prefix_with_order(schema, &tile_indices, bits)?;
81 Ok(TileId::new(prefix, system_from_ms))
82}
83
84fn out_of_domain<T>(schema: &ArraySchema, dim: &str, detail: &str) -> ArrayResult<T> {
85 Err(ArrayError::CoordOutOfDomain {

Callers 9

ceiling_for_coordMethod · 0.85
put_cellMethod · 0.85
delete_cellMethod · 0.85
erase_cellMethod · 0.85
rechunk_sparseFunction · 0.85

Calls 4

tile_indices_for_cellFunction · 0.85
bits_per_dimFunction · 0.85
arityMethod · 0.45