Struct rustitude_core::amplitude::Product

source ·
pub struct Product(/* private fields */);
Expand description

An AmpLike representing the product of the AmpLikes it contains.

Trait Implementations§

source§

impl Add<&Amplitude> for &Product

§

type Output = <Product as Add<Amplitude>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Amplitude) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Amplitude> for Product

§

type Output = <Product as Add<Amplitude>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Amplitude) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Imag> for &Product

§

type Output = <Product as Add<Imag>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Imag) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Imag> for Product

§

type Output = <Product as Add<Imag>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Imag) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Product> for &Amplitude

§

type Output = <Amplitude as Add<Product>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Product> for &CohSum

§

type Output = CohSum

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Product> for &Imag

§

type Output = <Imag as Add<Product>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Product> for &Product

§

type Output = <Product as Add>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Product> for &Real

§

type Output = <Real as Add<Product>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Product> for Amplitude

§

type Output = <Amplitude as Add<Product>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Product> for CohSum

§

type Output = CohSum

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Product> for Imag

§

type Output = <Imag as Add<Product>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Product> for Product

§

type Output = <Product as Add>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Product> for Real

§

type Output = <Real as Add<Product>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Real> for &Product

§

type Output = <Product as Add<Real>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Real) -> Self::Output

Performs the + operation. Read more
source§

impl Add<&Real> for Product

§

type Output = <Product as Add<Real>>::Output

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Real) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Amplitude> for Product

§

type Output = CohSum

The resulting type after applying the + operator.
source§

fn add(self, rhs: Amplitude) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Box<dyn AmpLike>> for Product

§

type Output = CohSum

The resulting type after applying the + operator.
source§

fn add(self, rhs: Box<dyn AmpLike>) -> Self::Output

Performs the + operation. Read more
source§

impl Add<CohSum> for Product

§

type Output = CohSum

The resulting type after applying the + operator.
source§

fn add(self, rhs: CohSum) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Imag> for Product

§

type Output = CohSum

The resulting type after applying the + operator.
source§

fn add(self, rhs: Imag) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Product> for &CohSum

§

type Output = CohSum

The resulting type after applying the + operator.
source§

fn add(self, rhs: Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Product> for Amplitude

§

type Output = CohSum

The resulting type after applying the + operator.
source§

fn add(self, rhs: Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Product> for Box<dyn AmpLike>

§

type Output = CohSum

The resulting type after applying the + operator.
source§

fn add(self, rhs: Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Product> for CohSum

§

type Output = CohSum

The resulting type after applying the + operator.
source§

fn add(self, rhs: Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Product> for Imag

§

type Output = CohSum

The resulting type after applying the + operator.
source§

fn add(self, rhs: Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Product> for Real

§

type Output = CohSum

The resulting type after applying the + operator.
source§

fn add(self, rhs: Product) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Real> for Product

§

type Output = CohSum

The resulting type after applying the + operator.
source§

fn add(self, rhs: Real) -> Self::Output

Performs the + operation. Read more
source§

impl Add for Product

§

type Output = CohSum

The resulting type after applying the + operator.
source§

fn add(self, rhs: Product) -> Self::Output

Performs the + operation. Read more
source§

impl AmpLike for Product

source§

fn get_cloned_terms(&self) -> Option<Vec<Box<dyn AmpLike>>>

This method returns clones of any AmpLikes wrapped by the given AmpLike.
source§

fn walk(&self) -> Vec<Amplitude>

This method walks through an AmpLike struct and recursively amalgamates a list of Amplitudes contained within. Note that these Amplitudes are owned clones of the interior structures.
source§

fn walk_mut(&mut self) -> Vec<&mut Amplitude>

This method is similar to AmpLike::walk, but returns mutable references rather than clones.
source§

fn compute(&self, cache: &[Option<Complex64>]) -> Option<Complex64>

Given a cache of complex values calculated from a list of amplitudes, this method will calculate the desired mathematical structure given by the AmpLike and any AmpLikes it contains.
source§

fn _print_tree(&self, bits: &mut Vec<bool>)

Prints the tree of AmpLikes starting with a particular indentation structure defined by bits. A true bit will print a vertical line, while a false bit will not.
source§

fn real(&self) -> Real
where Self: Sized + 'static,

Take the real part of an Amplitude or Amplitude-like struct.
source§

fn imag(&self) -> Imag
where Self: Sized + 'static,

Take the imaginary part of an Amplitude or Amplitude-like struct.
source§

fn prod(als: &Vec<Box<dyn AmpLike>>) -> Product
where Self: Sized + 'static,

Take the product of a Vec of Amplitude-like structs.
source§

fn sum(als: &Vec<Box<dyn AmpLike>>) -> CohSum
where Self: Sized + 'static,

Take the coherent sum (absolute square of the sum) of a Vec of Amplitude-like structs.
source§

fn as_cohsum(&self) -> CohSum
where Self: Sized + 'static,

Returns the given AmpLike as a coherent sum containing only itself.
source§

fn print_tree(&self)

Pretty-prints the structure of AmpLike structs starting at the current node.
source§

fn _print_indent(&self, bits: Vec<bool>)

Prints the proper indents for a given entry in AmpLike::print_tree. A true bit will print a vertical line, while a false bit will not.
source§

fn _print_intermediate(&self)

Prints the an intermediate branch for a given entry in AmpLike::print_tree.
source§

fn _print_end(&self)

Prints the a final branch for a given entry in AmpLike::print_tree.
source§

impl Clone for Product

source§

fn clone(&self) -> Product

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 Product

source§

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

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

impl Display for Product

source§

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

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

impl Mul<&Amplitude> for &Product

§

type Output = <Product as Mul<Amplitude>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Amplitude) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Amplitude> for Product

§

type Output = <Product as Mul<Amplitude>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Amplitude) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Imag> for &Product

§

type Output = <Product as Mul<Imag>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Imag) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Imag> for Product

§

type Output = <Product as Mul<Imag>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Imag) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Product> for &Amplitude

§

type Output = <Amplitude as Mul<Product>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Product> for &CohSum

§

type Output = CohSum

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Product> for &Imag

§

type Output = <Imag as Mul<Product>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Product> for &Product

§

type Output = <Product as Mul>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Product> for &Real

§

type Output = <Real as Mul<Product>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Product> for Amplitude

§

type Output = <Amplitude as Mul<Product>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Product> for CohSum

§

type Output = CohSum

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Product> for Imag

§

type Output = <Imag as Mul<Product>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Product> for Product

§

type Output = <Product as Mul>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Product> for Real

§

type Output = <Real as Mul<Product>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Real> for &Product

§

type Output = <Product as Mul<Real>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Real) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Real> for Product

§

type Output = <Product as Mul<Real>>::Output

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Real) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Amplitude> for Product

§

type Output = Product

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Amplitude) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Box<dyn AmpLike>> for Product

§

type Output = Product

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Box<dyn AmpLike>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<CohSum> for Product

§

type Output = CohSum

The resulting type after applying the * operator.
source§

fn mul(self, rhs: CohSum) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Imag> for Product

§

type Output = Product

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Imag) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Product> for &CohSum

§

type Output = CohSum

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Product> for Amplitude

§

type Output = Product

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Product> for Box<dyn AmpLike>

§

type Output = Product

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Product> for CohSum

§

type Output = CohSum

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Product> for Imag

§

type Output = Product

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Product> for Real

§

type Output = Product

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Product) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Real> for Product

§

type Output = Product

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Real) -> Self::Output

Performs the * operation. Read more
source§

impl Mul for Product

§

type Output = Product

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Product) -> Self::Output

Performs the * operation. Read more

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

source§

fn into_any(self: Box<T>) -> Box<dyn Any>

source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

source§

fn type_name(&self) -> &'static str

source§

impl<T> AnySync for T
where T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

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

source§

fn __clone_box(&self, _: Private) -> *mut ()

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> 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<T> Same for T

§

type Output = T

Should always be Self
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§

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<T> Ungil for T
where T: Send,