matrix: from_rows
This commit is contained in:
parent
10e56fb0b9
commit
ec82745c6d
@ -12,6 +12,13 @@ macro_rules! impl_matrix {
|
|||||||
self.array
|
self.array
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
|
pub fn from_rows(rows:[Vector<X,T>;Y])->Self
|
||||||
|
{
|
||||||
|
Matrix::new(
|
||||||
|
rows.map(|row|row.array),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
pub fn map<F,U>(self,f:F)->Matrix<X,Y,U>
|
pub fn map<F,U>(self,f:F)->Matrix<X,Y,U>
|
||||||
where
|
where
|
||||||
F:Fn(T)->U
|
F:Fn(T)->U
|
||||||
|
Loading…
Reference in New Issue
Block a user