[][src]Struct flag_algebra::operator::Basis

pub struct Basis<F> {
    pub size: usize,
    pub t: Type,
    // some fields omitted
}

The set of flags of size size and type t .get() returns an ordered vector containing all corresponding flags

Fields

size: usize

Number of vertices of the flags of the basis.

t: Type

Type of the flags of the basis.

Methods

impl<F: Flag> Basis<F>
[src]

pub fn make(size: usize, t: Type) -> Self
[src]

Constructor for a basis.

pub fn new(size: usize) -> Self
[src]

Basis of flag with size vertices and without type.

pub fn with_size(&self, size: usize) -> Self
[src]

Basis of flag with size vertices and same type as self.

pub fn with_type(&self, t: Type) -> Self
[src]

Basis of flag with same size as self and type t.

pub fn without_type(&self) -> Self
[src]

Basis of flag with same size as self without type t.

impl<F> Basis<F> where
    F: Flag
[src]

Constructing quantum graphs on a basis

pub fn zero<N>(self) -> QFlag<N, F> where
    N: Num + Clone
[src]

pub fn one<N>(self) -> QFlag<N, F> where
    N: Num + Clone
[src]

pub fn random<N>(self) -> QFlag<N, F> where
    N: From<i16>, 
[src]

pub fn flag_from_id<N>(self, id: usize) -> QFlag<N, F> where
    N: Num + Clone
[src]

pub fn flag_from_id_with_base_size<N>(
    self,
    id: usize,
    size: usize
) -> QFlag<N, F> where
    N: Num + Clone
[src]

pub fn flag<N>(self, f: &F) -> QFlag<N, F> where
    N: Num + Clone
[src]

pub fn from_vec<N>(self, vec: Vec<N>) -> QFlag<N, F>
[src]

pub fn from_indicator<M, N, P>(self, f: P) -> QFlag<N, F> where
    M: Into<N>,
    P: FnMut(&F, usize) -> M, 
[src]

pub fn all_cs(&self) -> Vec<MulAndUnlabeling<F>>
[src]

Trait Implementations

impl<F: Flag> Savable<Vec<F>, F> for Basis<F>
[src]

fn file_path(&self) -> PathBuf
[src]

Path to the corresponding file.

fn create_and_save(&self, path: &Path) -> A
[src]

(Re)create the object, save it in the corresponding file and return it.

fn load(&self, path: &Path) -> Result<A, Box<dyn Error>>
[src]

Load the object if the file exists and is valid.

fn get(&self) -> A
[src]

Function to automatically load the object if the file exists and is valid, or create and save it otherwise. Read more

impl<F: PartialEq> PartialEq<Basis<F>> for Basis<F>
[src]

impl<F: Eq> Eq for Basis<F>
[src]

impl<F> Clone for Basis<F>
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<F> Copy for Basis<F>
[src]

impl<F> Display for Basis<F>
[src]

impl<F: Debug> Debug for Basis<F>
[src]

impl<F: Hash> Hash for Basis<F>
[src]

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

Feeds a slice of this type into the given [Hasher]. Read more

impl<F: Flag> Mul<Basis<F>> for Basis<F>
[src]

type Output = Self

The resulting type after applying the * operator.

impl<F: Flag> Div<Basis<F>> for Basis<F>
[src]

type Output = Self

The resulting type after applying the / operator.

Auto Trait Implementations

impl<F> Send for Basis<F> where
    F: Send

impl<F> Sync for Basis<F> where
    F: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

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