Enum TemporalQuery

Source
pub enum TemporalQuery {
Show 15 variants SnapshotKnn { vector: Vec<f32>, timestamp: i64, k: usize, }, RangeKnn { vector: Vec<f32>, start: i64, end: i64, k: usize, alpha: f32, }, Trajectory { entity_id: u64, filter: TemporalFilter, }, Velocity { entity_id: u64, timestamp: i64, }, Prediction { entity_id: u64, target_timestamp: i64, }, ChangePointDetect { entity_id: u64, start: i64, end: i64, }, DriftQuant { entity_id: u64, t1: i64, t2: i64, top_n: usize, }, Analogy { entity_a: u64, t1: i64, t2: i64, entity_b: u64, t3: i64, }, Counterfactual { entity_id: u64, change_point: i64, }, GrangerCausality { entity_a: u64, entity_b: u64, max_lag: usize, significance: f64, }, DiscoverMotifs { entity_id: u64, window: usize, max_motifs: usize, }, DiscoverDiscords { entity_id: u64, window: usize, max_discords: usize, }, TemporalJoin { entity_a: u64, entity_b: u64, epsilon: f32, window_us: i64, }, CausalSearch { vector: Vec<f32>, k: usize, filter: TemporalFilter, alpha: f32, query_timestamp: i64, temporal_context: usize, }, CohortDrift { entity_ids: Vec<u64>, t1: i64, t2: i64, top_n: usize, },
}
Expand description

A temporal query request.

Variants§

§

SnapshotKnn

k-nearest neighbors at a specific timestamp.

Fields

§vector: Vec<f32>

Query vector.

§timestamp: i64

Exact timestamp.

§k: usize

Number of results.

§

RangeKnn

k-nearest neighbors over a time range.

Fields

§vector: Vec<f32>

Query vector.

§start: i64

Start timestamp (inclusive).

§end: i64

End timestamp (inclusive).

§k: usize

Number of results.

§alpha: f32

Semantic vs temporal weight.

§

Trajectory

Full trajectory for an entity.

Fields

§entity_id: u64

Entity identifier.

§filter: TemporalFilter

Temporal filter.

§

Velocity

Velocity at a given timestamp.

Fields

§entity_id: u64

Entity identifier.

§timestamp: i64

Timestamp to compute velocity at.

§

Prediction

Predict future vector state.

Fields

§entity_id: u64

Entity identifier.

§target_timestamp: i64

Target timestamp for prediction.

§

ChangePointDetect

Detect change points in a time window.

Fields

§entity_id: u64

Entity identifier.

§start: i64

Start timestamp.

§end: i64

End timestamp.

§

DriftQuant

Drift magnitude between two timestamps.

Fields

§entity_id: u64

Entity identifier.

§t1: i64

Start timestamp.

§t2: i64

End timestamp.

§top_n: usize

Number of top dimensions to report.

§

Analogy

Temporal analogy: “entity A at t1 is to A at t2 as B at t3 is to ?”

Fields

§entity_a: u64

Source entity.

§t1: i64

Source timestamp 1.

§t2: i64

Source timestamp 2.

§entity_b: u64

Target entity.

§t3: i64

Target timestamp.

§

Counterfactual

Counterfactual trajectory analysis.

Fields

§entity_id: u64

Entity identifier.

§change_point: i64

Change point timestamp.

§

GrangerCausality

Granger causality test between two entities.

Fields

§entity_a: u64

First entity (potential cause).

§entity_b: u64

Second entity (potential effect).

§max_lag: usize

Maximum lag to test.

§significance: f64

Significance threshold (e.g., 0.05).

§

DiscoverMotifs

Discover recurring motifs in an entity’s trajectory.

Fields

§entity_id: u64

Entity identifier.

§window: usize

Subsequence window size (number of time steps).

§max_motifs: usize

Maximum number of motifs to return.

§

DiscoverDiscords

Discover anomalous subsequences (discords) in an entity’s trajectory.

Fields

§entity_id: u64

Entity identifier.

§window: usize

Subsequence window size (number of time steps).

§max_discords: usize

Maximum number of discords to return.

§

TemporalJoin

Temporal join: find convergence windows between two entities.

Fields

§entity_a: u64

First entity.

§entity_b: u64

Second entity.

§epsilon: f32

Distance threshold for convergence.

§window_us: i64

Window size in microseconds.

§

CausalSearch

Causal search: semantic kNN + temporal edge context (RFC-010).

Fields

§vector: Vec<f32>

Query vector.

§k: usize

Number of results.

§filter: TemporalFilter

Temporal filter.

§alpha: f32

Semantic vs temporal weight.

§query_timestamp: i64

Reference timestamp.

§temporal_context: usize

Steps of temporal context (forward and backward).

§

CohortDrift

Cohort drift analysis across multiple entities.

Fields

§entity_ids: Vec<u64>

Entity identifiers in the cohort.

§t1: i64

Start timestamp.

§t2: i64

End timestamp.

§top_n: usize

Number of top dimensions to report.

Trait Implementations§

Source§

impl Clone for TemporalQuery

Source§

fn clone(&self) -> TemporalQuery

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TemporalQuery

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TemporalQuery

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for TemporalQuery

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,