pub struct GraphColors {
bdd: Bdd,
parameter_variables: Vec<BddVariable>,
}
Expand description
Symbolic representation of a color set.
Implementation contains all symbolic variables, but state variables are unconstrained.
Fields
bdd: Bdd
parameter_variables: Vec<BddVariable>
Implementations
sourceimpl GraphColors
impl GraphColors
sourcepub fn new(bdd: Bdd, context: &SymbolicContext) -> Self
pub fn new(bdd: Bdd, context: &SymbolicContext) -> Self
Make a new color set from a bdd
and a symbolic context
.
sourcepub fn copy(&self, bdd: Bdd) -> Self
pub fn copy(&self, bdd: Bdd) -> Self
Make a copy of graph colors with a new bdd
inheriting the original context.
sourcepub fn pick_singleton(&self) -> GraphColors
pub fn pick_singleton(&self) -> GraphColors
Pick one color from this set and return it as a singleton.
If the set is empty, return empty set.
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 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 GraphColors
impl Clone for GraphColors
sourcefn clone(&self) -> GraphColors
fn clone(&self) -> GraphColors
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 GraphColors
impl Debug for GraphColors
sourceimpl Hash for GraphColors
impl Hash for GraphColors
sourceimpl PartialEq<GraphColors> for GraphColors
impl PartialEq<GraphColors> for GraphColors
sourcefn eq(&self, other: &GraphColors) -> bool
fn eq(&self, other: &GraphColors) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &GraphColors) -> bool
fn ne(&self, other: &GraphColors) -> bool
This method tests for !=
.
sourceimpl Set for GraphColors
impl Set for GraphColors
Set operations.
impl Eq for GraphColors
impl StructuralEq for GraphColors
impl StructuralPartialEq for GraphColors
Auto Trait Implementations
impl RefUnwindSafe for GraphColors
impl Send for GraphColors
impl Sync for GraphColors
impl Unpin for GraphColors
impl UnwindSafe for GraphColors
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