matrix/operation.rs
1//! Basic operations.
2
3/// A multiplication.
4pub trait Multiply<Right: ?Sized, Output> {
5 /// Perform the multiplication.
6 fn multiply(&self, &Right) -> Output;
7}
8
9/// A multiplication that adds the result to a third object.
10pub trait MultiplyInto<Right: ?Sized, Output: ?Sized> {
11 /// Perform the multiplication.
12 fn multiply_into(&self, &Right, &mut Output);
13}
14
15/// A multiplication that overwrites the receiver with the result.
16pub trait MultiplySelf<Right: ?Sized> {
17 /// Perform the multiplication.
18 fn multiply_self(&mut self, &Right);
19}
20
21/// A scaling that overwrites the receiver with the result.
22pub trait ScaleSelf<T> {
23 /// Perform the scaling.
24 fn scale_self(&mut self, T);
25}
26
27/// The transpose.
28pub trait Transpose {
29 /// Perform the transpose.
30 fn transpose(&self) -> Self;
31}