use super::*;
use crate::col::ColMut;
pub struct DiagMut<'a, E: Entity> {
pub(crate) inner: ColMut<'a, E>,
}
impl<'a, E: Entity> DiagMut<'a, E> {
#[inline(always)]
pub fn column_vector_mut(self) -> ColMut<'a, E> {
self.inner
}
#[inline]
pub fn as_ref(&self) -> DiagRef<'_, E> {
self.rb()
}
#[inline]
pub fn as_mut(&mut self) -> DiagMut<'_, E> {
self.rb_mut()
}
}
impl<'short, E: Entity> Reborrow<'short> for DiagMut<'_, E> {
type Target = DiagRef<'short, E>;
#[inline]
fn rb(&'short self) -> Self::Target {
DiagRef {
inner: self.inner.rb(),
}
}
}
impl<'short, E: Entity> ReborrowMut<'short> for DiagMut<'_, E> {
type Target = DiagMut<'short, E>;
#[inline]
fn rb_mut(&'short mut self) -> Self::Target {
DiagMut {
inner: self.inner.rb_mut(),
}
}
}
impl<'a, E: Entity> IntoConst for DiagMut<'a, E> {
type Target = DiagRef<'a, E>;
#[inline]
fn into_const(self) -> Self::Target {
DiagRef {
inner: self.inner.into_const(),
}
}
}