Trait TrajectoryAccess

Source
pub trait TrajectoryAccess: Send + Sync {
    // Required methods
    fn trajectory(
        &self,
        entity_id: u64,
        filter: TemporalFilter,
    ) -> Vec<(i64, u32)>;
    fn vector(&self, node_id: u32) -> Vec<f32>;
    fn entity_id(&self, node_id: u32) -> u64;
    fn timestamp(&self, node_id: u32) -> i64;
    fn len(&self) -> usize;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Access to individual points and trajectories.

Required Methods§

Source

fn trajectory(&self, entity_id: u64, filter: TemporalFilter) -> Vec<(i64, u32)>

Retrieve trajectory for an entity: (timestamp, node_id) pairs.

Source

fn vector(&self, node_id: u32) -> Vec<f32>

Get the vector for a node. Returns owned vec for thread safety.

Source

fn entity_id(&self, node_id: u32) -> u64

Get the entity_id for a node.

Source

fn timestamp(&self, node_id: u32) -> i64

Get the timestamp for a node.

Source

fn len(&self) -> usize

Number of points in the index.

Provided Methods§

Source

fn is_empty(&self) -> bool

Whether the index is empty.

Implementors§