Skip to content

Commit 161cb13

Browse files
committed
Introduce TriangularMatrix
1 parent 0f5f87f commit 161cb13

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub mod vector;
3535
pub mod matrix;
3636
pub mod square;
3737
pub mod hermite;
38+
pub mod triangular;
3839

3940
pub mod qr;
4041
pub mod svd;

src/prelude.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ pub use vector::Vector;
33
pub use matrix::Matrix;
44
pub use square::SquareMatrix;
55
pub use hermite::HermiteMatrix;
6+
pub use triangular::TriangularMatrix;

src/triangular.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
use matrix::Matrix;
3+
use square::SquareMatrix;
4+
5+
pub trait TriangularMatrix: Matrix + SquareMatrix {
6+
fn solve_upper(&self, Self::Vector) -> Self::Vector;
7+
fn solve_lower(&self, Self::Vector) -> Self::Vector;
8+
}

0 commit comments

Comments
 (0)