pub struct GraphVertices {
bdd: Bdd,
state_variables: Vec<BddVariable>,
}
Expand description
Symbolic representation of a vertex set.
Implementation contains all symbolic variables, but parameter variables are unconstrained.
Fields
bdd: Bdd
state_variables: Vec<BddVariable>
Implementations
sourceimpl GraphVertices
impl GraphVertices
sourcepub fn new(bdd: Bdd, context: &SymbolicContext) -> Self
pub fn new(bdd: Bdd, context: &SymbolicContext) -> Self
Create a new set of vertices using the given Bdd
and a symbolic context
.
sourcepub fn approx_cardinality(&self) -> f64
pub fn approx_cardinality(&self) -> f64
Approximate size of this set (error grows for large sets).
sourcepub fn exact_cardinality(&self) -> BigInt
pub fn exact_cardinality(&self) -> BigInt
Compute exact BigInt
cardinality of this set.
sourcepub fn pick_singleton(&self) -> GraphVertices
pub fn pick_singleton(&self) -> GraphVertices
Pick one vertex from this set and return it as a singleton.
If the set is empty, return empty set.
sourcepub fn materialize(&self) -> IterableVertices
pub fn materialize(&self) -> IterableVertices
Create an iterable view of this vertex set.
Note that sadly you have to use set.materialize().iter()
to actually iterate over
the vertices, since we are not moving our the value of this set.
sourcepub fn symbolic_size(&self) -> usize
pub fn symbolic_size(&self) -> usize
Amount of storage used for this symbolic set.
sourcepub fn to_dot_string(&self, context: &SymbolicContext) -> String
pub fn to_dot_string(&self, context: &SymbolicContext) -> String
Convert this set to a .dot
graph.
Trait Implementations
sourceimpl Clone for GraphVertices
impl Clone for GraphVertices
sourcefn clone(&self) -> GraphVertices
fn clone(&self) -> GraphVertices
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for GraphVertices
impl Debug for GraphVertices
sourceimpl Hash for GraphVertices
impl Hash for GraphVertices
sourceimpl PartialEq<GraphVertices> for GraphVertices
impl PartialEq<GraphVertices> for GraphVertices
sourcefn eq(&self, other: &GraphVertices) -> bool
fn eq(&self, other: &GraphVertices) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &GraphVertices) -> bool
fn ne(&self, other: &GraphVertices) -> bool
This method tests for !=
.
sourceimpl Set for GraphVertices
impl Set for GraphVertices
impl Eq for GraphVertices
impl StructuralEq for GraphVertices
impl StructuralPartialEq for GraphVertices
Auto Trait Implementations
impl RefUnwindSafe for GraphVertices
impl Send for GraphVertices
impl Sync for GraphVertices
impl Unpin for GraphVertices
impl UnwindSafe for GraphVertices
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more