[][src]Struct varisat::variables::var_map::VarMap

pub struct VarMap {
    mapping: Vec<LitIdx>,
}

A mapping from variables to variables.

Fields

mapping: Vec<LitIdx>

Methods

impl VarMap[src]

pub fn get(&self, from: Var) -> Option<Var>[src]

Look up a variable in the mapping

pub fn insert(&mut self, into: Var, from: Var)[src]

Insert a new mapping.

Note that the parameters are reversed from the usual order, to match the naming convention used for maps.

This has the precondition that from is not mapped.

pub fn remove(&mut self, from: Var)[src]

Remove a mapping.

Does nothing if from is not mapped.

pub fn watermark(&self) -> usize[src]

One above the largest index that is mapped.

Trait Implementations

impl Default for VarMap[src]

Auto Trait Implementations

impl Send for VarMap

impl Sync for VarMap

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Reference, Outer, OuterFieldType, Inner> HasPart<Nested<Outer, Inner>> for Reference where
    Inner: Part,
    Outer: Part<PartType = Field<OuterFieldType>>,
    OuterFieldType: HasPart<Inner, RawTarget = OuterFieldType> + PartialRefTarget + ?Sized,
    Reference: HasPart<Outer> + ?Sized