Struct If

Source
pub struct If<A, ArgNames, P, FTrue, FFalse>
where Self: Computation,
{ pub child: A, pub arg_names: ArgNames, pub predicate: P, pub f_true: FTrue, pub f_false: FFalse, }

Fields§

§child: A§arg_names: ArgNames§predicate: P§f_true: FTrue§f_false: FFalse

Trait Implementations§

Source§

impl<Rhs, A, ArgNames, P, FTrue, FFalse> Add<Rhs> for If<A, ArgNames, P, FTrue, FFalse>
where Self: Computation, Add<Self, Rhs>: Computation,

Source§

type Output = Add<If<A, ArgNames, P, FTrue, FFalse>, Rhs>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<A: Clone, ArgNames: Clone, P: Clone, FTrue: Clone, FFalse: Clone> Clone for If<A, ArgNames, P, FTrue, FFalse>
where Self: Computation,

Source§

fn clone(&self) -> If<A, ArgNames, P, FTrue, FFalse>

Returns a duplicate 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<A, ArgNames, P, FTrue, FFalse, FDim, FItem> Computation for If<A, ArgNames, P, FTrue, FFalse>
where A: Computation, P: ComputationFn<Dim = Zero, Item = bool>, FTrue: ComputationFn<Dim = FDim, Item = FItem>, FFalse: ComputationFn<Dim = FDim, Item = FItem>,

Source§

type Dim = FDim

Source§

type Item = FItem

Source§

fn add<Rhs>(self, rhs: Rhs) -> Add<Self, Rhs>
where Self: Sized, Add<Self, Rhs>: Computation,

Source§

fn sub<Rhs>(self, rhs: Rhs) -> Sub<Self, Rhs>
where Self: Sized, Sub<Self, Rhs>: Computation,

Source§

fn mul<Rhs>(self, rhs: Rhs) -> Mul<Self, Rhs>
where Self: Sized, Mul<Self, Rhs>: Computation,

Source§

fn div<Rhs>(self, rhs: Rhs) -> Div<Self, Rhs>
where Self: Sized, Div<Self, Rhs>: Computation,

Source§

fn pow<Rhs>(self, rhs: Rhs) -> Pow<Self, Rhs>
where Self: Sized, Pow<Self, Rhs>: Computation,

Source§

fn neg(self) -> Neg<Self>
where Self: Sized, Neg<Self>: Computation,

Source§

fn abs(self) -> Abs<Self>
where Self: Sized, Abs<Self>: Computation,

Source§

fn sin(self) -> Sin<Self>
where Self: Sized, Sin<Self>: Computation,

Source§

fn cos(self) -> Cos<Self>
where Self: Sized, Cos<Self>: Computation,

Source§

fn tan(self) -> Tan<Self>
where Self: Sized, Tan<Self>: Computation,

Source§

fn asin(self) -> Asin<Self>
where Self: Sized, Asin<Self>: Computation,

Source§

fn acos(self) -> Acos<Self>
where Self: Sized, Acos<Self>: Computation,

Source§

fn atan(self) -> Atan<Self>
where Self: Sized, Atan<Self>: Computation,

Source§

fn eq<Rhs>(self, rhs: Rhs) -> Eq<Self, Rhs>
where Self: Sized, Eq<Self, Rhs>: Computation,

Source§

fn ne<Rhs>(self, rhs: Rhs) -> Ne<Self, Rhs>
where Self: Sized, Ne<Self, Rhs>: Computation,

Source§

fn lt<Rhs>(self, rhs: Rhs) -> Lt<Self, Rhs>
where Self: Sized, Lt<Self, Rhs>: Computation,

Source§

fn le<Rhs>(self, rhs: Rhs) -> Le<Self, Rhs>
where Self: Sized, Le<Self, Rhs>: Computation,

Source§

fn gt<Rhs>(self, rhs: Rhs) -> Gt<Self, Rhs>
where Self: Sized, Gt<Self, Rhs>: Computation,

Source§

fn ge<Rhs>(self, rhs: Rhs) -> Ge<Self, Rhs>
where Self: Sized, Ge<Self, Rhs>: Computation,

Source§

fn max(self) -> Max<Self>
where Self: Sized, Max<Self>: Computation,

Source§

fn not(self) -> Not<Self>
where Self: Sized, Not<Self>: Computation,

Source§

fn enumerate<F>(self, f: Function<(Name, Name), F>) -> Enumerate<Self, F>
where Self: Sized, Enumerate<Self, F>: Computation,

Source§

fn sum(self) -> Sum<Self>
where Self: Sized, Sum<Self>: Computation,

Source§

fn zip<Rhs>(self, rhs: Rhs) -> Zip<Self, Rhs>
where Self: Sized, Zip<Self, Rhs>: Computation,

Source§

fn fst(self) -> Fst<Self>
where Self: Sized, Fst<Self>: Computation,

Source§

fn snd(self) -> Snd<Self>
where Self: Sized, Snd<Self>: Computation,

Source§

fn black_box<F, FDim, FItem>(self, f: F) -> BlackBox<Self, F, FDim, FItem>
where Self: Sized, BlackBox<Self, F, FDim, FItem>: Computation,

Run the given regular function F. Read more
Source§

fn if_<ArgNames, P, FTrue, FFalse>( self, arg_names: ArgNames, predicate: P, f_true: FTrue, f_false: FFalse, ) -> If<Self, ArgNames, P, FTrue, FFalse>
where Self: Sized, If<Self, ArgNames, P, FTrue, FFalse>: Computation,

Source§

fn loop_while<ArgNames, F, P>( self, arg_names: ArgNames, f: F, predicate: P, ) -> LoopWhile<Self, ArgNames, F, P>
where Self: Sized, LoopWhile<Self, ArgNames, F, P>: Computation,

Source§

fn then<ArgNames, F>(self, f: Function<ArgNames, F>) -> Then<Self, ArgNames, F>
where Self: Sized, Then<Self, ArgNames, F>: Computation,

Source§

fn identity_matrix<T>(self) -> IdentityMatrix<Self, T>
where Self: Sized, IdentityMatrix<Self, T>: Computation,

Return a self by self identity-matrix. Read more
Source§

fn scalar_product<Rhs>(self, rhs: Rhs) -> ScalarProduct<Self, Rhs>
where Self: Sized, Mul<Self, Rhs>: Computation, ScalarProduct<Self, Rhs>: Computation,

Multiply and sum the elements of two vectors. Read more
Source§

fn mat_mul<Rhs>(self, rhs: Rhs) -> MatMul<Self, Rhs>
where Self: Sized, MatMul<Self, Rhs>: Computation,

Perform matrix-multiplication.
Source§

fn mul_out<Rhs>(self, rhs: Rhs) -> MulOut<Self, Rhs>
where Self: Sized, MulOut<Self, Rhs>: Computation,

Multiply elements from the Cartesian product of two vectors. Read more
Source§

fn mul_col<Rhs>(self, rhs: Rhs) -> MulCol<Self, Rhs>
where Self: Sized, MulCol<Self, Rhs>: Computation,

Matrix-multiply a matrix by a column-matrix, returning a vector.
Source§

fn len(self) -> Len<Self>
where Self: Sized, Len<Self>: Computation,

Source§

impl<A, ArgNames, P, FTrue, FFalse> ComputationFn for If<A, ArgNames, P, FTrue, FFalse>
where Self: Computation, A: ComputationFn, If<A::Filled, ArgNames, P, FTrue, FFalse>: Computation,

Source§

type Filled = If<<A as ComputationFn>::Filled, ArgNames, P, FTrue, FFalse>

Source§

fn fill(self, named_args: NamedArgs) -> Self::Filled

Fill arguments will values, replacing Args with Vals.
Source§

fn arg_names(&self) -> Names

Source§

impl<A: Debug, ArgNames: Debug, P: Debug, FTrue: Debug, FFalse: Debug> Debug for If<A, ArgNames, P, FTrue, FFalse>
where Self: Computation,

Source§

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

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

impl<A, ArgNames, P, FTrue, FFalse> Display for If<A, ArgNames, P, FTrue, FFalse>
where Self: Computation, A: Display, ArgNames: Debug, P: Display, FTrue: Display, FFalse: Display,

Source§

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

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

impl<Rhs, A, ArgNames, P, FTrue, FFalse> Div<Rhs> for If<A, ArgNames, P, FTrue, FFalse>
where Self: Computation, Div<Self, Rhs>: Computation,

Source§

type Output = Div<If<A, ArgNames, P, FTrue, FFalse>, Rhs>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Rhs) -> Self::Output

Performs the / operation. Read more
Source§

impl<Rhs, A, ArgNames, P, FTrue, FFalse> Mul<Rhs> for If<A, ArgNames, P, FTrue, FFalse>
where Self: Computation, Mul<Self, Rhs>: Computation,

Source§

type Output = Mul<If<A, ArgNames, P, FTrue, FFalse>, Rhs>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<A, ArgNames, P, FTrue, FFalse> Neg for If<A, ArgNames, P, FTrue, FFalse>
where Self: Computation, Neg<Self>: Computation,

Source§

type Output = Neg<If<A, ArgNames, P, FTrue, FFalse>>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<A, ArgNames, P, FTrue, FFalse, Collected, Out> RunCore for If<A, ArgNames, P, FTrue, FFalse>
where Self: Computation, A: Computation + RunCore, A::Output: Collect<A::Dim, Collected = Collected>, Collected: Clone, ArgNames: Clone, (ArgNames, Collected): Into<NamedArgs>, P: ComputationFn, P::Filled: Run<Output = bool>, FTrue: ComputationFn, FTrue::Filled: RunCore, <FTrue::Filled as RunCore>::Output: Collect<FTrue::Dim, Collected = Out>, FFalse: ComputationFn, FFalse::Filled: RunCore, <FFalse::Filled as RunCore>::Output: Collect<FFalse::Dim, Collected = Out>,

Source§

type Output = Out

Source§

fn run_core(self) -> Self::Output

Source§

impl<Rhs, A, ArgNames, P, FTrue, FFalse> Sub<Rhs> for If<A, ArgNames, P, FTrue, FFalse>
where Self: Computation, Sub<Self, Rhs>: Computation,

Source§

type Output = Sub<If<A, ArgNames, P, FTrue, FFalse>, Rhs>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Rhs) -> Self::Output

Performs the - operation. Read more
Source§

impl<A: Copy, ArgNames: Copy, P: Copy, FTrue: Copy, FFalse: Copy> Copy for If<A, ArgNames, P, FTrue, FFalse>
where Self: Computation,

Auto Trait Implementations§

§

impl<A, ArgNames, P, FTrue, FFalse> Freeze for If<A, ArgNames, P, FTrue, FFalse>
where A: Freeze, ArgNames: Freeze, P: Freeze, FTrue: Freeze, FFalse: Freeze,

§

impl<A, ArgNames, P, FTrue, FFalse> RefUnwindSafe for If<A, ArgNames, P, FTrue, FFalse>
where A: RefUnwindSafe, ArgNames: RefUnwindSafe, P: RefUnwindSafe, FTrue: RefUnwindSafe, FFalse: RefUnwindSafe,

§

impl<A, ArgNames, P, FTrue, FFalse> Send for If<A, ArgNames, P, FTrue, FFalse>
where A: Send, ArgNames: Send, P: Send, FTrue: Send, FFalse: Send,

§

impl<A, ArgNames, P, FTrue, FFalse> Sync for If<A, ArgNames, P, FTrue, FFalse>
where A: Sync, ArgNames: Sync, P: Sync, FTrue: Sync, FFalse: Sync,

§

impl<A, ArgNames, P, FTrue, FFalse> Unpin for If<A, ArgNames, P, FTrue, FFalse>
where A: Unpin, ArgNames: Unpin, P: Unpin, FTrue: Unpin, FFalse: Unpin,

§

impl<A, ArgNames, P, FTrue, FFalse> UnwindSafe for If<A, ArgNames, P, FTrue, FFalse>
where A: UnwindSafe, ArgNames: UnwindSafe, P: UnwindSafe, FTrue: UnwindSafe, FFalse: 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> AnyArg for T
where T: 'static + Clone + Debug,

Source§

fn boxed_clone(&self) -> Box<dyn AnyArg>

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§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

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

impl<T> Collect<Zero> for T

Source§

impl<T> Downcast for T
where T: Any,

Source§

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

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

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

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

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

Source§

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

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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,

Source§

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§

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>,

Source§

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>,

Source§

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