[−][src]Struct biodivine_lib_bdd::BddPointer
(internal) A type-safe index into the Bdd
node array representation.
BDD pointers are an internal type-safe wrapper around indices into BDD arrays.
Outside this crate, no one should know or care about their existence. Since
we can't reasonably expect a BDD to be larger than 2^32
right now, the pointer is
represented as u32
instead of usize
, because usize
can be 64-bits and pointers
represent most of the memory consumed by our BDDs.
Implementations
impl BddPointer
[src]
pub fn zero() -> BddPointer
[src]
Make a new pointer to the 0
terminal node.
pub fn one() -> BddPointer
[src]
Make a new pointer to the 1
terminal node.
pub fn is_zero(&self) -> bool
[src]
Check if the pointer corresponds to the 0
terminal.
pub fn is_one(&self) -> bool
[src]
Check if the pointer corresponds to the 1
terminal.
pub fn is_terminal(&self) -> bool
[src]
Check if the pointer corresponds to the 0
or 1
terminal.
pub fn to_index(&self) -> usize
[src]
Cast this pointer to standard usize index.
pub fn from_index(index: usize) -> BddPointer
[src]
Create a pointer from an usize index.
pub fn from_bool(value: bool) -> BddPointer
[src]
Convert a bool
value to valid terminal BDD pointer.
pub fn as_bool(&self) -> Option<bool>
[src]
If this pointer is a terminal, convert it to bool
, otherwise return None
.
pub fn flip_if_terminal(&mut self)
[src]
If this pointer corresponds to a terminal node, flip it (switching 1
to 0
and
vice versa).
pub fn to_le_bytes(&self) -> [u8; 4]
[src]
Convert to little endian bytes
pub fn from_le_bytes(bytes: [u8; 4]) -> BddPointer
[src]
Read from little endian byte representation
Trait Implementations
impl Clone for BddPointer
[src]
pub fn clone(&self) -> BddPointer
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for BddPointer
[src]
impl Debug for BddPointer
[src]
impl Display for BddPointer
[src]
For display purposes, pointer is just a number.
impl Eq for BddPointer
[src]
impl Hash for BddPointer
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for BddPointer
[src]
pub fn cmp(&self, other: &BddPointer) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<BddPointer> for BddPointer
[src]
pub fn eq(&self, other: &BddPointer) -> bool
[src]
pub fn ne(&self, other: &BddPointer) -> bool
[src]
impl PartialOrd<BddPointer> for BddPointer
[src]
pub fn partial_cmp(&self, other: &BddPointer) -> Option<Ordering>
[src]
pub fn lt(&self, other: &BddPointer) -> bool
[src]
pub fn le(&self, other: &BddPointer) -> bool
[src]
pub fn gt(&self, other: &BddPointer) -> bool
[src]
pub fn ge(&self, other: &BddPointer) -> bool
[src]
impl StructuralEq for BddPointer
[src]
impl StructuralPartialEq for BddPointer
[src]
Auto Trait Implementations
impl RefUnwindSafe for BddPointer
impl Send for BddPointer
impl Sync for BddPointer
impl Unpin for BddPointer
impl UnwindSafe for BddPointer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,