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

Function encode_cell_prefix

nodedb-array/src/coord/encode.rs:33–40  ·  view source on GitHub ↗

Encode whichever space-filling curve the schema declares for cells.

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

Source from the content-addressed store, hash-verified

31
32/// Encode whichever space-filling curve the schema declares for cells.
33pub fn encode_cell_prefix(schema: &ArraySchema, coord: &[CoordValue]) -> ArrayResult<u64> {
34 match schema.cell_order {
35 CellOrder::Hilbert | CellOrder::RowMajor | CellOrder::ColMajor => {
36 encode_hilbert_prefix(schema, coord)
37 }
38 CellOrder::ZOrder => encode_zorder_prefix(schema, coord),
39 }
40}
41
42/// Encode whichever curve the schema declares for tile boundaries.
43pub fn encode_tile_prefix_with_order(

Callers 1

Calls 2

encode_hilbert_prefixFunction · 0.85
encode_zorder_prefixFunction · 0.85

Tested by 1