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

source

pub fn new(bdd: Bdd, context: &SymbolicContext) -> Self

Make a new color set from a bdd and a symbolic context.

source

pub fn copy(&self, bdd: Bdd) -> Self

Make a copy of graph colors with a new bdd inheriting the original context.

source

pub fn into_bdd(self) -> Bdd

Convert this set to a raw Bdd.

source

pub fn as_bdd(&self) -> &Bdd

View this set as a raw Bdd.

source

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.

source

pub fn approx_cardinality(&self) -> f64

Approximate size of this set (error grows for large sets).

source

pub fn exact_cardinality(&self) -> BigInt

Compute exact BigInt cardinality of this set.

source

pub fn symbolic_size(&self) -> usize

Amount of storage used for this symbolic set.

source

pub fn to_dot_string(&self, context: &SymbolicContext) -> String

Convert this set to a .dot graph.

source

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.

source

pub fn is_singleton(&self) -> bool

Return true if the set represents a single color.

source

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.

source

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

source§

fn clone(&self) -> GraphColors

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GraphColors

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for GraphColors

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for GraphColors

source§

fn eq(&self, other: &GraphColors) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for GraphColors

source§

impl StructuralPartialEq for GraphColors

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Set for T
where T: BddSet + Clone,

source§

fn union(&self, other: &T) -> T

source§

fn intersect(&self, other: &T) -> T

source§

fn minus(&self, other: &T) -> T

source§

fn is_empty(&self) -> bool

source§

fn is_subset(&self, other: &T) -> bool

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V