pub struct GraphColors { /* private fields */ }
Expand description
Symbolic representation of a color set.
Implementation contains all symbolic variables, but state variables are unconstrained.
Implementations§
source§impl 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.
sourcepub fn is_subspace(&self) -> bool
pub fn is_subspace(&self) -> bool
Return true
if the set can be described by a single conjunction of literals. That is,
the set is a hypercube in the $\mathbb{B}^n$ space.
sourcepub fn is_singleton(&self) -> bool
pub fn is_singleton(&self) -> bool
Return true
if the set represents a single color.
sourcepub fn raw_projection(&self, eliminate: &[BddVariable]) -> RawProjection
pub fn raw_projection(&self, eliminate: &[BddVariable]) -> RawProjection
Perform a “raw projection” which eliminates the given symbolic variables from this set.
Technically, you can supply any BddVariable
, but the underlying Bdd
of this set
should only depend on parameter variables.
sourcepub fn fn_update_projection<'a>(
&self,
functions: &[VariableId],
context: &'a SymbolicAsyncGraph
) -> FnUpdateProjection<'a>
pub fn fn_update_projection<'a>( &self, functions: &[VariableId], context: &'a SymbolicAsyncGraph ) -> FnUpdateProjection<'a>
Create an iterable symbolic projection which only retains the update functions of the specified network variables.
Trait Implementations§
source§impl Clone for GraphColors
impl Clone for GraphColors
source§fn clone(&self) -> GraphColors
fn clone(&self) -> GraphColors
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GraphColors
impl Debug for GraphColors
source§impl Hash for GraphColors
impl Hash for GraphColors
source§impl PartialEq for GraphColors
impl PartialEq for GraphColors
source§fn eq(&self, other: &GraphColors) -> bool
fn eq(&self, other: &GraphColors) -> bool
self
and other
values to be equal, and is used
by ==
.