struct Partition<D: DistanceMetric> {
start_us: i64,
end_us: i64,
hnsw: TemporalHnsw<D>,
id_offset: u32,
point_count: usize,
}Expand description
A single time partition containing an HNSW graph.
Fields§
§start_us: i64Start of the time range (inclusive).
end_us: i64End of the time range (exclusive).
hnsw: TemporalHnsw<D>The HNSW graph for this partition.
id_offset: u32Offset for mapping local node IDs to global IDs. global_id = id_offset + local_id
point_count: usizeNumber of points in this partition.
Implementations§
Source§impl<D: DistanceMetric> Partition<D>
impl<D: DistanceMetric> Partition<D>
Sourcefn overlaps(&self, filter: &TemporalFilter) -> bool
fn overlaps(&self, filter: &TemporalFilter) -> bool
Whether this partition’s time range overlaps with the given filter.
Sourcefn contains_timestamp(&self, timestamp: i64) -> bool
fn contains_timestamp(&self, timestamp: i64) -> bool
Whether a timestamp falls within this partition’s range.
Auto Trait Implementations§
impl<D> Freeze for Partition<D>where
D: Freeze,
impl<D> RefUnwindSafe for Partition<D>where
D: RefUnwindSafe,
impl<D> Send for Partition<D>
impl<D> Sync for Partition<D>
impl<D> Unpin for Partition<D>where
D: Unpin,
impl<D> UnwindSafe for Partition<D>where
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more