EditQueryIndex¶
Qualified name: algan.animation\_timeline.timeline.EditQueryIndex
- class EditQueryIndex(head, sorted_edit_ids, edit_timestamps, sorted_values, unique_timestamps, keys)[source]¶
Bases:
objectSearch structure over one attribute’s edit log, on
times’ device.head/sorted_edit_ids/sorted_valuesare the CSR form of the edit table: the edits touching rowjoccupy[head[j], head[j+1]), in execution order (and therefore in non-decreasingedit_timestampsorder, whichAttributeTimeline.prepare_for_queries()guarantees). Materializing a row’s state at timetis an upper-bound search fortinside that row’s segment.keyslinearizes those per-row searches into a single globally sorted array so onetorch.searchsorted()answers all of them:keys[m] = row(m) * n_ranks + rank(timestamp(m)), whererankindexes the sorted unique timestamps. Integer ranks (rather than the timestamps themselves) keep the composite key exact, and the key is sorted becauserowis non-decreasing across the table and the rank is non-decreasing within every row.The edit log is immutable while frames are rendered, so this is built once per attribute per render job and cached (
AttributeTimeline._prepared_queries()).Methods
Attributes
headsorted_edit_idsedit_timestampssorted_valuesunique_timestampskeys