Skip to content

Commit 70e31bc

Browse files
committed
feat: Add matrix and vector structs
1 parent cc91cbd commit 70e31bc

File tree

7 files changed

+1520
-140
lines changed

7 files changed

+1520
-140
lines changed

src/axes.rs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub type Axes = Vec<usize>;

src/coordinate.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,17 @@ impl fmt::Display for Coordinate {
5151
#[macro_export]
5252
macro_rules! coord {
5353
($($index:expr),*) => {
54-
Coordinate::new(vec![$($index),*])
54+
{
55+
use $crate::coordinate::Coordinate;
56+
Coordinate::new(vec![$($index),*])
57+
}
5558
};
5659

5760
($index:expr; $count:expr) => {
58-
Coordinate::new(vec![$index; $count])
61+
{
62+
use $crate::coordinate::Coordinate;
63+
Coordinate::new(vec![$index; $count])
64+
}
5965
};
6066
}
6167

src/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ pub mod iter;
33
pub mod error;
44
pub mod coordinate;
55
pub mod storage;
6-
pub mod tensor;
6+
pub mod tensor;
7+
pub mod vector;
8+
pub mod matrix;
9+
pub mod axes;

0 commit comments

Comments
 (0)