1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//! Basic operations.

/// A multiplication.
pub trait Multiply<Right: ?Sized, Output> {
    /// Perform the multiplication.
    fn multiply(&self, &Right) -> Output;
}

/// A multiplication that adds the result to a third object.
pub trait MultiplyInto<Right: ?Sized, Output: ?Sized> {
    /// Perform the multiplication.
    fn multiply_into(&self, &Right, &mut Output);
}

/// A multiplication that overwrites the receiver with the result.
pub trait MultiplySelf<Right: ?Sized> {
    /// Perform the multiplication.
    fn multiply_self(&mut self, &Right);
}

/// A scaling that overwrites the receiver with the result.
pub trait ScaleSelf<T> {
    /// Perform the scaling.
    fn scale_self(&mut self, T);
}

/// The transpose.
pub trait Transpose {
    /// Perform the transpose.
    fn transpose(&self) -> Self;
}