pub struct VarSet { /* private fields */ }
Expand description
Variable set, potentially along with a variable order and variable names
The variable numbers are in range 0..self.len()
.
Implementations§
Source§impl VarSet
impl VarSet
Sourcepub fn with_names(names: Vec<Option<String>>) -> Self
pub fn with_names(names: Vec<Option<String>>) -> Self
Create a variable set with the given names
The number of variables is given by names.len()
.
Sourcepub fn order(&self) -> Option<&[Var]>
pub fn order(&self) -> Option<&[Var]>
Get the linear variable order, if present
The order is given as a mapping from positions to variables.
If self.order_tree()
is not None
, then it is the
flattened tree.
Sourcepub fn order_tree(&self) -> Option<&Tree<Var>>
pub fn order_tree(&self) -> Option<&Tree<Var>>
Get the tree of variable groups, if present
This may be useful for, e.g., group sifting.
Trait Implementations§
impl Eq for VarSet
impl StructuralPartialEq for VarSet
Auto Trait Implementations§
impl Freeze for VarSet
impl RefUnwindSafe for VarSet
impl Send for VarSet
impl Sync for VarSet
impl Unpin for VarSet
impl UnwindSafe for VarSet
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