pub struct ScalarMatrixProduct {}Expand description
Multiplies every element of the RHS tensor by the single scalar in the 0-d LHS tensor.
This contraction can arise when the simplification of the LHS tensor results in all the
axes being summed before the two tensors are contracted. For example, in the contraction
i,jk->jk, every element of the RHS tensor is simply multiplied by the sum of the elements
of the LHS tensor.
Implementations§
Source§impl ScalarMatrixProduct
impl ScalarMatrixProduct
pub fn new(sc: &SizedContraction) -> Self
pub fn from_nothing() -> Self
Trait Implementations§
Source§impl Clone for ScalarMatrixProduct
impl Clone for ScalarMatrixProduct
Source§fn clone(&self) -> ScalarMatrixProduct
fn clone(&self) -> ScalarMatrixProduct
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScalarMatrixProduct
impl Debug for ScalarMatrixProduct
Source§impl<A> PairContractor<A> for ScalarMatrixProduct
impl<A> PairContractor<A> for ScalarMatrixProduct
fn contract_pair<'a, 'b, 'c, 'd>(
&self,
lhs: &'b ArrayViewD<'a, A>,
rhs: &'d ArrayViewD<'c, A>,
) -> ArrayD<A>where
A: Clone + LinalgScalar,
'a: 'b,
'c: 'd,
fn contract_and_assign_pair<'a, 'b, 'c, 'd, 'e, 'f>(
&self,
lhs: &'b ArrayViewD<'a, A>,
rhs: &'d ArrayViewD<'c, A>,
out: &'f mut ArrayViewMutD<'e, A>,
)where
A: Clone + LinalgScalar,
'a: 'b,
'c: 'd,
'e: 'f,
Auto Trait Implementations§
impl Freeze for ScalarMatrixProduct
impl RefUnwindSafe for ScalarMatrixProduct
impl Send for ScalarMatrixProduct
impl Sync for ScalarMatrixProduct
impl Unpin for ScalarMatrixProduct
impl UnwindSafe for ScalarMatrixProduct
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