pub struct RAMLookup<T, ID: LookupTableID> { /* private fields */ }
Expand description
Struct containing a RAMLookup
Implementations§
source§impl<T, ID> RAMLookup<T, ID>where
T: Clone + Add<T, Output = T> + Sub<T, Output = T> + Mul<T, Output = T> + Debug + One + Zero,
ID: LookupTableID,
impl<T, ID> RAMLookup<T, ID>where T: Clone + Add<T, Output = T> + Sub<T, Output = T> + Mul<T, Output = T> + Debug + One + Zero, ID: LookupTableID,
sourcepub fn new(mode: LookupMode, table_id: ID, magnitude: T, value: &[T]) -> Self
pub fn new(mode: LookupMode, table_id: ID, magnitude: T, value: &[T]) -> Self
Creates a new RAMLookup from a mode, a table ID, a magnitude, and a value
sourcepub fn numerator(&self) -> T
pub fn numerator(&self) -> T
Returns the numerator corresponding to this lookup in the Logup argument
sourcepub fn into_logup(self) -> Logup<T, ID>
pub fn into_logup(self) -> Logup<T, ID>
Transforms the current RAMLookup into an equivalent Logup
sourcepub fn read_if(if_is_true: T, table_id: ID, value: Vec<T>) -> Self
pub fn read_if(if_is_true: T, table_id: ID, value: Vec<T>) -> Self
Reads one value when if_is_true
is 1.
Trait Implementations§
Auto Trait Implementations§
impl<T, ID> RefUnwindSafe for RAMLookup<T, ID>where ID: RefUnwindSafe, T: RefUnwindSafe,
impl<T, ID> Send for RAMLookup<T, ID>where T: Send,
impl<T, ID> Sync for RAMLookup<T, ID>where T: Sync,
impl<T, ID> Unpin for RAMLookup<T, ID>where ID: Unpin, T: Unpin,
impl<T, ID> UnwindSafe for RAMLookup<T, ID>where ID: UnwindSafe, T: 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