pub trait Activate<T> {
type Cont<U>;
// Required method
fn rho<F, U>(&self, f: F) -> Self::Cont<U>
where F: FnMut(T) -> U;
// Provided methods
fn heavyside(&self) -> Self::Cont<T>
where T: PartialOrd + One + Zero { ... }
fn relu(&self) -> Self::Cont<T>
where T: PartialOrd + Zero { ... }
fn sinh(&self) -> Self::Cont<T>
where T: Float { ... }
fn tanh(&self) -> Self::Cont<<T as Tanh>::Output>
where T: Tanh { ... }
}Expand description
Activate is a higher-kinded trait that provides a mechanism to apply a function over the
elements within a container or structure.
Required Associated Types§
Required Methods§
Provided Methods§
fn heavyside(&self) -> Self::Cont<T>
fn relu(&self) -> Self::Cont<T>where
T: PartialOrd + Zero,
fn sinh(&self) -> Self::Cont<T>where
T: Float,
fn tanh(&self) -> Self::Cont<<T as Tanh>::Output>where
T: Tanh,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.