pub enum BrickDomain {
    Top,
    Value(Brick),
}
Expand description

The single brick domain that represents a set of character sequences as well as the minimum and maximum of the sum of their occurrences.

e.g. [{“mo”, “de”}]^{1,2} represents the following set of strings: {mo, de, momo, dede, mode, demo}.

Variants§

§

Top

The Top value represents the powerset over the alphabet of allowed characters with a minimum of 0 and a maximum of positive infinity.

§

Value(Brick)

The set of character sequences as well as the minimum and maximum of the sum of their occurrences.

Implementations§

source§

impl BrickDomain

source

pub fn widen(&self, other: &BrickDomain) -> Self

The widen function of the BrickDomain takes the union of both BrickDomains and returns Top if the number of sequences exceeds a certain threshold. If neither of the domains are Top, the minimum and maximum of the interval bounds are taken and it is checked whether their difference exceeds a certain threshold. If so min is set to 0 and max is set to infinity (here Max value of 32 bits). Otherwise, their values are taken as new bounds for the merged domain.

source

pub fn is_less_or_equal(&self, other: &BrickDomain) -> bool

Checks whether the current BrickDomain is less or equal than the other BrickDomain by definition of the partial order. Empty strings are ignored for order comparisons.

source§

impl BrickDomain

source

pub fn new(string: String) -> Self

Returns a new instance of the Brick Domain

Trait Implementations§

source§

impl AbstractDomain for BrickDomain

source§

fn merge(&self, other: &Self) -> Self

Takes care of merging single bricks by taking the union of the two brick’s string sequences and the minimum and maximum of their respective min and max values.

source§

fn is_top(&self) -> bool

Check if the value is Top.

source§

fn merge_with(&mut self, other: &Self) -> &mut Self

Returns an upper bound (with respect to the partial order on the domain) for the two inputs self and other. Read more
source§

impl Clone for BrickDomain

source§

fn clone(&self) -> BrickDomain

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 BrickDomain

source§

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

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

impl<'de> Deserialize<'de> for BrickDomain

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for BrickDomain

source§

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

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

impl PartialEq for BrickDomain

source§

fn eq(&self, other: &BrickDomain) -> 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 Serialize for BrickDomain

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for BrickDomain

source§

impl StructuralEq for BrickDomain

source§

impl StructuralPartialEq for BrickDomain

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
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> 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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,