1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
use std::error::Error;

pub mod bd;
pub mod ci;
pub mod di;
pub mod ge;
pub mod gt;
pub mod kr;
pub mod sp_hp;
pub mod ss;
pub mod st;
pub mod to;

pub use bd::*;
pub use ci::*;
pub use di::*;
pub use ge::{
    or_un::*,
    sy_he::{po::*, *},
    tr::*,
    *,
};
pub use gt::*;
pub use kr::*;
pub use sp_hp::{pp::*, *};
pub use ss::*;
pub use st::{pt::*, *};
pub use to::*;

#[derive(thiserror::Error, Debug)]
pub enum MatrixError {
    #[error("Dimension mismatch.")]
    DimensionMismatch,
    #[error("BLAS routine error. routine: {routine}, info: {info}")]
    BlasRoutineError { routine: String, info: i32 },
    #[error("LAPACK routine error. routine: {routine}, info: {info}")]
    LapackRoutineError { routine: String, info: i32 },
    #[error("Others")]
    Others(Box<dyn Error + Send + Sync>),
}