[][src]Struct flag_algebra::QFlag

pub struct QFlag<N, F> {
    pub basis: Basis<F>,
    pub data: Array1<N>,
    pub scale: u64,
    pub expr: Expr,
}

An element of a flag algebra.

Fields

basis: Basis<F>

Basis of the space where the element lives. This corresponds to the size and type of the flags.

data: Array1<N>

The vector of the element in the corresponding basis is (1/self.scale).self.data.

scale: u64

Scaling factor of the vector.

expr: Expr

Expression recording how the vector was computed.

Methods

impl<N, F> QFlag<N, F> where
    N: Copy + Num + Default + NumCast + AddAssign,
    F: Flag
[src]

pub fn expand(&self, outbasis: Basis<F>) -> Self[src]

Projection to a basis of larger flag.

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

Unlabeling operator 〚.〛 to the flag algebra of completly unlabeled flags.

impl<N, F> QFlag<N, F> where
    N: Num + NumCast + Display,
    F: Flag
[src]

pub fn at_least(self, x: N) -> Ineq<N, F>[src]

Return the inequality "selfn".

pub fn at_most(self, n: N) -> Ineq<N, F> where
    N: Clone + Neg<Output = N>, 
[src]

Return the inequality "selfn".

pub fn non_negative(self) -> Ineq<N, F> where
    N: Num
[src]

Return the inequality "self0".

Trait Implementations

impl<N, F> PartialEq<QFlag<N, F>> for QFlag<N, F> where
    N: Num + NumCast + Copy,
    F: Flag
[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<N: Clone, F: Clone> Clone for QFlag<N, F>[src]

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

Performs copy-assignment from source. Read more

impl<'a, N, F> Add<&'a QFlag<N, F>> for &'a QFlag<N, F> where
    N: Clone + NumCast + Num + ScalarOperand,
    F: Flag
[src]

type Output = QFlag<N, F>

The resulting type after applying the + operator.

impl<N, F> Add<QFlag<N, F>> for QFlag<N, F> where
    N: Clone + Num + NumCast + ScalarOperand,
    F: Flag
[src]

type Output = Self

The resulting type after applying the + operator.

impl<'a, N, F> Sub<&'a QFlag<N, F>> for &'a QFlag<N, F> where
    N: Clone + Num + NumCast + ScalarOperand,
    F: Flag
[src]

type Output = QFlag<N, F>

The resulting type after applying the - operator.

impl<N, F> Sub<QFlag<N, F>> for QFlag<N, F> where
    N: Clone + Num + NumCast + ScalarOperand,
    F: Flag
[src]

type Output = Self

The resulting type after applying the - operator.

impl<S, N, F> Mul<S> for QFlag<N, F> where
    N: Num + ScalarOperand + NumCast + Display,
    F: Flag,
    S: ToPrimitive
[src]

type Output = Self

The resulting type after applying the * operator.

impl<'a, N, F> Mul<&'a QFlag<N, F>> for &'a QFlag<N, F> where
    N: Num + Copy + AddAssign + Default + NumCast,
    F: Flag
[src]

type Output = QFlag<N, F>

The resulting type after applying the * operator.

impl<N, F> Mul<QFlag<N, F>> for QFlag<N, F> where
    N: Num + Copy + AddAssign + Default + NumCast,
    F: Flag
[src]

type Output = Self

The resulting type after applying the * operator.

impl<N, F> Neg for QFlag<N, F> where
    N: Clone + Neg<Output = N>, 
[src]

type Output = Self

The resulting type after applying the - operator.

impl<'a, N, F> Neg for &'a QFlag<N, F> where
    N: Clone + Neg<Output = N>, 
[src]

type Output = QFlag<N, F>

The resulting type after applying the - operator.

impl<N: Debug, F: Debug> Debug for QFlag<N, F>[src]

Auto Trait Implementations

impl<N, F> Send for QFlag<N, F> where
    F: Send,
    N: Send

impl<N, F> Unpin for QFlag<N, F> where
    F: Unpin,
    N: Unpin

impl<N, F> Sync for QFlag<N, F> where
    F: Sync,
    N: Sync

impl<N, F> UnwindSafe for QFlag<N, F> where
    F: UnwindSafe,
    N: RefUnwindSafe + UnwindSafe

impl<N, F> RefUnwindSafe for QFlag<N, F> where
    F: RefUnwindSafe,
    N: RefUnwindSafe

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

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

impl<T> ClosedNeg for T where
    T: Neg<Output = T>,