pub struct ExponentBlock<T: Pass + Default> {
pub data: BlockData,
/* private fields */
}Expand description
Raises the input to a specified power (coefficient), and optionally preserves the sign of the input.
It can accept a scalar or a matrix input. If the input is a matrix, the exponentiation is performed element-wise.
The power to raise the input to as well as a flag to optionally preserve the sign of the input when performing the exponentiation can be set in the parameters.
§Panics
If the input is negative and the coefficient is < 1.0 and preserve_sign is false, a panic will occur.
Fields§
§data: BlockDataTrait Implementations§
Source§impl<S: Scalar + Float + Zero, const NROWS: usize, const NCOLS: usize> ProcessBlock for ExponentBlock<Matrix<NROWS, NCOLS, S>>
impl<S: Scalar + Float + Zero, const NROWS: usize, const NCOLS: usize> ProcessBlock for ExponentBlock<Matrix<NROWS, NCOLS, S>>
Source§impl<S: Scalar + Float + Zero> ProcessBlock for ExponentBlock<S>
impl<S: Scalar + Float + Zero> ProcessBlock for ExponentBlock<S>
Auto Trait Implementations§
impl<T> Freeze for ExponentBlock<T>where
T: Freeze,
impl<T> RefUnwindSafe for ExponentBlock<T>where
T: RefUnwindSafe,
impl<T> Send for ExponentBlock<T>where
T: Send,
impl<T> Sync for ExponentBlock<T>where
T: Sync,
impl<T> Unpin for ExponentBlock<T>where
T: Unpin,
impl<T> UnsafeUnpin for ExponentBlock<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ExponentBlock<T>where
T: UnwindSafe,
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.