pub struct Permutation {
permutation: Vec<usize>,
}Expand description
Permutes the axes of the input tensor and returns a view or clones the elements.
Example: ij->ji
Fields§
§permutation: Vec<usize>Implementations§
Source§impl Permutation
impl Permutation
pub fn new(sc: &SizedContraction) -> Self
pub fn from_indices(permutation: &[usize]) -> Self
Trait Implementations§
Source§impl Clone for Permutation
impl Clone for Permutation
Source§fn clone(&self) -> Permutation
fn clone(&self) -> Permutation
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 Permutation
impl Debug for Permutation
Source§impl<A> SingletonContractor<A> for Permutation
impl<A> SingletonContractor<A> for Permutation
fn contract_singleton<'a, 'b>(&self, tensor: &'b ArrayViewD<'a, A>) -> ArrayD<A>where
A: Clone + LinalgScalar,
'a: 'b,
Source§impl<A> SingletonViewer<A> for Permutation
impl<A> SingletonViewer<A> for Permutation
fn view_singleton<'a, 'b>(
&self,
tensor: &'b ArrayViewD<'a, A>,
) -> ArrayViewD<'b, A>where
A: Clone + LinalgScalar,
'a: 'b,
Auto Trait Implementations§
impl Freeze for Permutation
impl RefUnwindSafe for Permutation
impl Send for Permutation
impl Sync for Permutation
impl Unpin for Permutation
impl UnwindSafe for Permutation
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