pub struct EvalPointOracleIdMap<T: Clone, F: Field> { /* private fields */ }
Expand description
Data structure for efficiently querying and inserting evaluations of claims.
Equivalent to a HashMap<(OracleId, EvalPoint<F>), T>
but uses vectors of vectors to store the data.
This data structure is more memory efficient for small number of evaluation points and OracleIds which
are grouped together.
Implementations§
Source§impl<T: Clone, F: Field> EvalPointOracleIdMap<T, F>
impl<T: Clone, F: Field> EvalPointOracleIdMap<T, F>
pub fn new() -> Self
Sourcepub fn get(&self, id: OracleId, eval_point: &[F]) -> Option<&T>
pub fn get(&self, id: OracleId, eval_point: &[F]) -> Option<&T>
Query the first value found for an evaluation point for a given oracle id.
Returns None
if no value is found.
Sourcepub fn insert(&mut self, id: OracleId, eval_point: EvalPoint<F>, val: T)
pub fn insert(&mut self, id: OracleId, eval_point: EvalPoint<F>, val: T)
Insert a new evaluation point for a given oracle id.
We do not replace existing values.
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl<T, F> Freeze for EvalPointOracleIdMap<T, F>
impl<T, F> RefUnwindSafe for EvalPointOracleIdMap<T, F>
impl<T, F> Send for EvalPointOracleIdMap<T, F>
impl<T, F> Sync for EvalPointOracleIdMap<T, F>
impl<T, F> Unpin for EvalPointOracleIdMap<T, F>
impl<T, F> UnwindSafe for EvalPointOracleIdMap<T, F>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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