pub struct GraphColoredVertices {
bdd: Bdd,
state_variables: Vec<BddVariable>,
parameter_variables: Vec<BddVariable>,
}
Expand description
Symbolic representation of a coloured set of graph vertices, i.e. a subset of $V \times C$.
Fields
bdd: Bdd
state_variables: Vec<BddVariable>
parameter_variables: Vec<BddVariable>
Implementations
sourceimpl GraphColoredVertices
impl GraphColoredVertices
Basic utility operations.
sourcepub fn new(bdd: Bdd, context: &SymbolicContext) -> GraphColoredVertices
pub fn new(bdd: Bdd, context: &SymbolicContext) -> GraphColoredVertices
Construct a new colored vertex set from a given bdd
and symbolic context
.
sourcepub fn copy(&self, bdd: Bdd) -> GraphColoredVertices
pub fn copy(&self, bdd: Bdd) -> GraphColoredVertices
Construct a new colored vertex set by copying the context of the current set.
The contents of the set are completely replaced using the provided bdd
, but the
underlying SymbolicAsyncGraph
remains the same.
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 symbolic_size(&self) -> usize
pub fn symbolic_size(&self) -> usize
Amount of storage used for this symbolic 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.
sourceimpl GraphColoredVertices
impl GraphColoredVertices
Relation operations.
sourcepub fn minus_colors(&self, colors: &GraphColors) -> Self
pub fn minus_colors(&self, colors: &GraphColors) -> Self
Remove every occurrence of a color form colors
set.
sourcepub fn intersect_colors(&self, colors: &GraphColors) -> Self
pub fn intersect_colors(&self, colors: &GraphColors) -> Self
Only retain colours in the supplied colors
set.
sourcepub fn minus_vertices(&self, vertices: &GraphVertices) -> Self
pub fn minus_vertices(&self, vertices: &GraphVertices) -> Self
Remove every occurrence of a vertex from vertices
, regardless of color.
sourcepub fn intersect_vertices(&self, vertices: &GraphVertices) -> Self
pub fn intersect_vertices(&self, vertices: &GraphVertices) -> Self
Retain only occurrences of vertices from vertices
, regardless of color.
sourcepub fn pick_vertex(&self) -> Self
pub fn pick_vertex(&self) -> Self
For every color, pick exactly one vertex.
sourcepub fn pick_color(&self) -> Self
pub fn pick_color(&self) -> Self
For every vertex, pick exactly one color.
sourcepub fn pick_singleton(&self) -> GraphColoredVertices
pub fn pick_singleton(&self) -> GraphColoredVertices
Pick one (vertex, color) pair from this set and return it as a singleton.
If the set is empty, return empty set.
sourcepub fn colors(&self) -> GraphColors
pub fn colors(&self) -> GraphColors
Set of all colors which are in this set for at least one vertex.
sourcepub fn vertices(&self) -> GraphVertices
pub fn vertices(&self) -> GraphVertices
Set of all vertices which are in this set for at least one colour.
Trait Implementations
sourceimpl Clone for GraphColoredVertices
impl Clone for GraphColoredVertices
sourcefn clone(&self) -> GraphColoredVertices
fn clone(&self) -> GraphColoredVertices
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 GraphColoredVertices
impl Debug for GraphColoredVertices
sourceimpl Hash for GraphColoredVertices
impl Hash for GraphColoredVertices
sourceimpl PartialEq<GraphColoredVertices> for GraphColoredVertices
impl PartialEq<GraphColoredVertices> for GraphColoredVertices
sourcefn eq(&self, other: &GraphColoredVertices) -> bool
fn eq(&self, other: &GraphColoredVertices) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &GraphColoredVertices) -> bool
fn ne(&self, other: &GraphColoredVertices) -> bool
This method tests for !=
.
sourceimpl Set for GraphColoredVertices
impl Set for GraphColoredVertices
Set operations.
impl Eq for GraphColoredVertices
impl StructuralEq for GraphColoredVertices
impl StructuralPartialEq for GraphColoredVertices
Auto Trait Implementations
impl RefUnwindSafe for GraphColoredVertices
impl Send for GraphColoredVertices
impl Sync for GraphColoredVertices
impl Unpin for GraphColoredVertices
impl UnwindSafe for GraphColoredVertices
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