Added missing ops implementations for DMat
This commit is contained in:
parent
51381ff84d
commit
2efb30876e
@ -700,6 +700,15 @@ impl<N: Copy + Add<N, Output = N>> Add<DMat<N>> for DMat<N> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a, N: Copy + Add<N, Output = N>> Add<DMat<N>> for &'a DMat<N> {
|
||||||
|
type Output = DMat<N>;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn add(self, right: DMat<N>) -> DMat<N> {
|
||||||
|
right + self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<'a, N: Copy + Add<N, Output = N>> Add<&'a DMat<N>> for DMat<N> {
|
impl<'a, N: Copy + Add<N, Output = N>> Add<&'a DMat<N>> for DMat<N> {
|
||||||
type Output = DMat<N>;
|
type Output = DMat<N>;
|
||||||
|
|
||||||
@ -742,6 +751,15 @@ impl<N: Copy + Sub<N, Output = N>> Sub<DMat<N>> for DMat<N> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a, N: Copy + Sub<N, Output = N>> Sub<DMat<N>> for &'a DMat<N> {
|
||||||
|
type Output = DMat<N>;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn sub(self, right: DMat<N>) -> DMat<N> {
|
||||||
|
right - self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<'a, N: Copy + Sub<N, Output = N>> Sub<&'a DMat<N>> for DMat<N> {
|
impl<'a, N: Copy + Sub<N, Output = N>> Sub<&'a DMat<N>> for DMat<N> {
|
||||||
type Output = DMat<N>;
|
type Output = DMat<N>;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user