Skip to main content

Module coo

Module coo 

Source
Expand description

COO (Coordinate) sparse layout element lookup.

Implements element lookup from docs/spec/layouts/coo.md § Storage Order: locate the stored non-zero whose coordinate tuple equals the query, using a lexicographic binary search when the entries are sorted, or a linear scan otherwise. Mirrors the standalone-function API validated by super::csf::element_offset.

Functions§

element_offset
Looks up the storage offset (values buffer index) of a logical index in a COO tensor, or returns None if the element is structurally absent (implicit zero).