pub struct MatrixScalarProduct {}Expand description
Multiplies every element of the LHS tensor by the single scalar in the 0-d RHS 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
ij,k->ij, every element of the LHS tensor is simply multiplied by the sum of the elements
of the RHS tensor.
Implementations§
Source§impl MatrixScalarProduct
impl MatrixScalarProduct
pub fn new(sc: &SizedContraction) -> Self
pub fn from_nothing() -> Self
Trait Implementations§
Source§impl Clone for MatrixScalarProduct
impl Clone for MatrixScalarProduct
Source§fn clone(&self) -> MatrixScalarProduct
fn clone(&self) -> MatrixScalarProduct
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 MatrixScalarProduct
impl Debug for MatrixScalarProduct
Source§impl<A> PairContractor<A> for MatrixScalarProduct
impl<A> PairContractor<A> for MatrixScalarProduct
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 MatrixScalarProduct
impl RefUnwindSafe for MatrixScalarProduct
impl Send for MatrixScalarProduct
impl Sync for MatrixScalarProduct
impl Unpin for MatrixScalarProduct
impl UnwindSafe for MatrixScalarProduct
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