Struct flag_algebra::SubClass

source ·
pub struct SubClass<F, A> {
    pub content: F,
    /* private fields */
}
Expand description

A wrapper type for flags from a sub-class of flags.

This structure is meant to be used with the SubFlag trait. The second type parameter serves as an identifier for the subclass and should implement SubFlag<F>.

See the SubFlag page for an example.

Fields§

§content: F

Type of flag wrapped.

Implementations§

source§

impl<A, const K: u8> SubClass<CGraph<K>, A>

This should be properly implemented with a trait:

source

pub fn size(&self) -> usize

source

pub fn is_edge(&self, u: usize, v: usize) -> bool

source

pub fn edge(&self, u: usize, v: usize) -> u8

source§

impl<A, const K: u8, const N: u8> SubClass<Colored<CGraph<K>, N>, A>

source

pub fn size(&self) -> usize

source

pub fn is_edge(&self, u: usize, v: usize) -> bool

source

pub fn edge(&self, u: usize, v: usize) -> u8

source§

impl<A> SubClass<OrientedGraph, A>

source

pub fn size(&self) -> usize

Trait Implementations§

source§

impl<F, A> Canonize for SubClass<F, A>
where F: Flag,

source§

fn size(&self) -> usize

Return the number of vertices. Read more
source§

fn invariant_neighborhood(&self, v: usize) -> Vec<Vec<usize>>

Return lists of vertices that are invariant isomorphism. Read more
source§

fn apply_morphism(&self, p: &[usize]) -> Self

Return the result of the action of a permuation p on the object. Read more
source§

fn invariant_coloring(&self) -> Option<Vec<u64>>

Optionally returns a value for each node that is invariant by isomorphism. Read more
source§

fn canonical(&self) -> Self

Computes a canonical form of a combinatorial object. Read more
source§

fn canonical_typed(&self, sigma: usize) -> Self

The “typed” objects refers to the case where only the action of permutations that are constant on 0..sigma are considered. Read more
source§

fn morphism_to_canonical(&self) -> Vec<usize>

Return a permutation p such that self.apply_morphism(&p) = self.canonical(). Read more
source§

fn morphism_to_canonical_typed(&self, sigma: usize) -> Vec<usize>

Return a permutation phi such that g.apply_morphism(&phi) = canonical_typed(&g, sigma). Read more
source§

fn automorphisms(&self) -> AutomorphismIterator<Self>

Iterator on the automorphism group of g. Read more
source§

fn stabilizer(&self, sigma: usize) -> AutomorphismIterator<Self>

Iterator on the automorphisms of g that fix the sigma first vertices. Read more
source§

impl<F: Flag, A> Clone for SubClass<F, A>

source§

fn clone(&self) -> Self

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<F: Flag, A> Debug for SubClass<F, A>

source§

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

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

impl<'de, F: Flag, A> Deserialize<'de> for SubClass<F, A>

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<F: Flag, A> Display for SubClass<F, A>

source§

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

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

impl<F, A> Draw for SubClass<F, A>
where F: Draw,

Inheritance

source§

fn draw_with_parameters<C>(&self, color: C, type_size: usize) -> SVG
where C: FnMut(usize) -> usize,

source§

fn draw(&self) -> SVG

source§

fn draw_typed(&self, type_size: usize) -> SVG

source§

fn to_svg_file(&self, filename: &str)

source§

impl<F, A> Flag for SubClass<F, A>
where A: SubFlag<F>, F: Flag,

source§

const NAME: &'static str = A::SUBCLASS_NAME

A unique name for this type of flags. For instance “Graph”. This nameis used for naming the associated data subdirectory.
source§

const HEREDITARY: bool = A::HEREDITARY

Setting this parameter to false deactivate checks that induced subflags exists. Must be true in every classic case.
source§

fn superflags(&self) -> Vec<Self>

Return the list of flags of size self.size() + 1 that contain self as an induced subflag. Read more
source§

fn induce(&self, p: &[usize]) -> Self

Returns the subflag induced by the vertices in the slice set.
source§

fn size_zero_flags() -> Vec<Self>

Returns the set of all flags of size 0. Read more
source§

fn generate_next(previous: &[Self]) -> Vec<Self>

Return the list of flags of size self.size() + 1 that contain self as an induced subflag reduced modulo isomorphism.
source§

fn generate(n: usize) -> Vec<Self>

Return the list of flags of size n reduced modulo isomorphism.
source§

fn generate_typed_up(type_flag: &Self, g_vec: &[Self]) -> Vec<Self>

Return the list of flags of g_vec that can be rooted on the flag type_flag. Each different way to root this flag give a different flag in the result.
source§

fn generate_typed(type_flag: &Self, size: usize) -> Vec<Self>

Return the list of flag of size size rooted on type_flag reduced modulo (typed) isomorphism.
source§

fn select_type(&self, eta: &[usize]) -> Self

Reorder self so that the eta.len() first vertices are the values of eta in the corresponding order.
source§

impl<F, A> From<F> for SubClass<F, A>

source§

fn from(x: F) -> Self

Converts to this type from the input type.
source§

impl<F: Flag, A> Ord for SubClass<F, A>

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<F: Flag, A> PartialEq for SubClass<F, A>

source§

fn eq(&self, other: &Self) -> 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<F: Flag, A> PartialOrd for SubClass<F, A>

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<F: Flag, A> Serialize for SubClass<F, A>

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<F: Flag, A> Eq for SubClass<F, A>

Auto Trait Implementations§

§

impl<F, A> Freeze for SubClass<F, A>
where F: Freeze,

§

impl<F, A> RefUnwindSafe for SubClass<F, A>

§

impl<F, A> Send for SubClass<F, A>
where F: Send, A: Send,

§

impl<F, A> Sync for SubClass<F, A>
where F: Sync, A: Sync,

§

impl<F, A> Unpin for SubClass<F, A>
where F: Unpin, A: Unpin,

§

impl<F, A> UnwindSafe for SubClass<F, A>
where F: UnwindSafe, A: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<F> Html for F
where F: Draw,

source§

fn print_html<W>(&self, w: &mut W) -> Result<(), Error>
where W: Write,

source§

const LATEX: bool = false

source§

fn html(&self, name: &str) -> Result<()>

True if Mathjax need to be loaded
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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
source§

unsafe fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,