Skip to content

Commit 772dafa

Browse files
committed
remove floatlike requirement on get_raw_data and get_dim
1 parent 8088bde commit 772dafa

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/matrix.rs

+10-8
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,6 @@ impl<T: FloatLike> SquareMatrix<T> {
238238
})
239239
}
240240

241-
pub fn get_dim(&self) -> usize {
242-
self.dim
243-
}
244-
245-
pub fn get_raw_data(self) -> SmallVec<[T; 36]> {
246-
self.data
247-
}
248-
249241
fn new_identity(dim: usize) -> Self {
250242
let mut res = Self::new_zeros(dim);
251243
for i in 0..dim {
@@ -269,6 +261,16 @@ impl<T: FloatLike> SquareMatrix<T> {
269261
}
270262
}
271263

264+
impl<T> SquareMatrix<T> {
265+
pub fn get_dim(&self) -> usize {
266+
self.dim
267+
}
268+
269+
pub fn get_raw_data(self) -> SmallVec<[T; 36]> {
270+
self.data
271+
}
272+
}
273+
272274
impl SquareMatrix<f128> {
273275
pub fn downcast(&self) -> SquareMatrix<f64> {
274276
SquareMatrix {

0 commit comments

Comments
 (0)