pub struct MatrixScalarProductGeneral {
lhs_permutation: Permutation,
matrix_scalar_product: MatrixScalarProduct,
}Expand description
Permutes the axes of the LHS tensor to the output order and multiply all elements by the single scalar in the 0-d RHS tensor.
This contraction can arise when the simplification of the RHS tensor results in all the
axes being summed before the two tensors are contracted. For example, in the contraction
ij,k->ji, the output matrix is equal to the LHS matrix, transposed and then scalar-multiplied
by the sum of the elements of the RHS tensor.
Fields§
§lhs_permutation: Permutation§matrix_scalar_product: MatrixScalarProductImplementations§
Source§impl MatrixScalarProductGeneral
impl MatrixScalarProductGeneral
pub fn new(sc: &SizedContraction) -> Self
pub fn from_indices(input_indices: &[char], output_indices: &[char]) -> Self
Trait Implementations§
Source§impl Clone for MatrixScalarProductGeneral
impl Clone for MatrixScalarProductGeneral
Source§fn clone(&self) -> MatrixScalarProductGeneral
fn clone(&self) -> MatrixScalarProductGeneral
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 MatrixScalarProductGeneral
impl Debug for MatrixScalarProductGeneral
Source§impl<A> PairContractor<A> for MatrixScalarProductGeneral
impl<A> PairContractor<A> for MatrixScalarProductGeneral
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 MatrixScalarProductGeneral
impl RefUnwindSafe for MatrixScalarProductGeneral
impl Send for MatrixScalarProductGeneral
impl Sync for MatrixScalarProductGeneral
impl Unpin for MatrixScalarProductGeneral
impl UnwindSafe for MatrixScalarProductGeneral
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