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<A: Clone, ArgNames: Clone, P: Clone, FTrue: Clone, FFalse: Clone> Clone for If<A, ArgNames, P, FTrue, FFalse>where
Self: Computation,
impl<A: Clone, ArgNames: Clone, P: Clone, FTrue: Clone, FFalse: Clone> Clone for If<A, ArgNames, P, FTrue, FFalse>where
Self: Computation,
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>,
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>,
type Dim = FDim
type Item = FItem
fn add<Rhs>(self, rhs: Rhs) -> Add<Self, Rhs>
fn sub<Rhs>(self, rhs: Rhs) -> Sub<Self, Rhs>
fn mul<Rhs>(self, rhs: Rhs) -> Mul<Self, Rhs>
fn div<Rhs>(self, rhs: Rhs) -> Div<Self, Rhs>
fn pow<Rhs>(self, rhs: Rhs) -> Pow<Self, Rhs>
fn neg(self) -> Neg<Self>
fn abs(self) -> Abs<Self>
fn sin(self) -> Sin<Self>
fn cos(self) -> Cos<Self>
fn tan(self) -> Tan<Self>
fn asin(self) -> Asin<Self>
fn acos(self) -> Acos<Self>
fn atan(self) -> Atan<Self>
fn eq<Rhs>(self, rhs: Rhs) -> Eq<Self, Rhs>
fn ne<Rhs>(self, rhs: Rhs) -> Ne<Self, Rhs>
fn lt<Rhs>(self, rhs: Rhs) -> Lt<Self, Rhs>
fn le<Rhs>(self, rhs: Rhs) -> Le<Self, Rhs>
fn gt<Rhs>(self, rhs: Rhs) -> Gt<Self, Rhs>
fn ge<Rhs>(self, rhs: Rhs) -> Ge<Self, Rhs>
fn max(self) -> Max<Self>
fn not(self) -> Not<Self>
fn enumerate<F>(self, f: Function<(Name, Name), F>) -> Enumerate<Self, F>
fn sum(self) -> Sum<Self>
fn zip<Rhs>(self, rhs: Rhs) -> Zip<Self, Rhs>
fn fst(self) -> Fst<Self>
fn snd(self) -> Snd<Self>
Source§fn black_box<F, FDim, FItem>(self, f: F) -> BlackBox<Self, F, FDim, FItem>
fn black_box<F, FDim, FItem>(self, f: F) -> BlackBox<Self, F, FDim, FItem>
Run the given regular function
F
. Read morefn if_<ArgNames, P, FTrue, FFalse>( self, arg_names: ArgNames, predicate: P, f_true: FTrue, f_false: FFalse, ) -> If<Self, ArgNames, P, FTrue, FFalse>
fn loop_while<ArgNames, F, P>( self, arg_names: ArgNames, f: F, predicate: P, ) -> LoopWhile<Self, ArgNames, F, P>
fn then<ArgNames, F>(self, f: Function<ArgNames, F>) -> Then<Self, ArgNames, F>
Source§fn identity_matrix<T>(self) -> IdentityMatrix<Self, T>
fn identity_matrix<T>(self) -> IdentityMatrix<Self, T>
Source§fn scalar_product<Rhs>(self, rhs: Rhs) -> ScalarProduct<Self, Rhs>
fn scalar_product<Rhs>(self, rhs: Rhs) -> ScalarProduct<Self, Rhs>
Multiply and sum the elements of two vectors. Read more
Source§fn mul_out<Rhs>(self, rhs: Rhs) -> MulOut<Self, Rhs>
fn mul_out<Rhs>(self, rhs: Rhs) -> MulOut<Self, Rhs>
Multiply elements from the Cartesian product of two vectors. Read more
Source§fn mul_col<Rhs>(self, rhs: Rhs) -> MulCol<Self, Rhs>
fn mul_col<Rhs>(self, rhs: Rhs) -> MulCol<Self, Rhs>
Matrix-multiply a matrix by a column-matrix,
returning a vector.
fn len(self) -> Len<Self>
Source§impl<A, ArgNames, P, FTrue, FFalse> ComputationFn for If<A, ArgNames, P, FTrue, FFalse>
impl<A, ArgNames, P, FTrue, FFalse> ComputationFn for If<A, ArgNames, P, FTrue, FFalse>
Source§impl<A: Debug, ArgNames: Debug, P: Debug, FTrue: Debug, FFalse: Debug> Debug for If<A, ArgNames, P, FTrue, FFalse>where
Self: Computation,
impl<A: Debug, ArgNames: Debug, P: Debug, FTrue: Debug, FFalse: Debug> Debug for If<A, ArgNames, P, FTrue, FFalse>where
Self: Computation,
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>,
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>,
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>
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>
impl<A, ArgNames, P, FTrue, FFalse> Sync for If<A, ArgNames, P, FTrue, FFalse>
impl<A, ArgNames, P, FTrue, FFalse> Unpin for If<A, ArgNames, P, FTrue, FFalse>
impl<A, ArgNames, P, FTrue, FFalse> UnwindSafe for If<A, ArgNames, P, FTrue, FFalse>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
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>
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)
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)
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.