Skip to content

Commit

Permalink
Ver 0.38.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Axect committed Nov 6, 2024
2 parents cf183cf + 6f508d0 commit 768c4e8
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "peroxide"
version = "0.38.0"
version = "0.38.1"
authors = ["axect <[email protected]>"]
edition = "2018"
description = "Rust comprehensive scientific computation library contains linear algebra, numerical analysis, statistics and machine learning tools with farmiliar syntax"
Expand Down
6 changes: 5 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Release 0.38.0
# Release 0.38.1 (2024-11-06)

- Fix error in `O3` feature

# Release 0.38.0 (Yanked)

## New features - Complex & Parallel

Expand Down
3 changes: 1 addition & 2 deletions src/complex/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{
traits::fp::{FPMatrix, FPVector},
traits::general::Algorithm,
traits::math::{InnerProduct, LinearOp, MatrixProduct, Norm, Normed, Vector},
traits::matrix::{Form, LinearAlgebra, MatrixTrait, SolveKind, PQLU, QR, SVD, WAZD},
traits::matrix::{Form, LinearAlgebra, MatrixTrait, SolveKind, PQLU, QR, SVD, WAZD, UPLO},
traits::mutable::MutMatrix,
util::low_level::{copy_vec_ptr, swap_vec_ptr},
util::non_macro::ConcatenateError,
Expand Down Expand Up @@ -879,7 +879,6 @@ pub fn complex_cbind(m1: ComplexMatrix, m2: ComplexMatrix) -> Result<ComplexMatr
}

/// R like rbind - concatenate two complex matrix by row direction
/// ```
pub fn complex_rbind(m1: ComplexMatrix, m2: ComplexMatrix) -> Result<ComplexMatrix> {
let mut temp = m1;
if temp.shape != Shape::Row {
Expand Down
2 changes: 1 addition & 1 deletion src/fuga/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ pub use crate::statistics::stat::QType::{
};
pub use crate::structure::ad::AD::*;
pub use crate::structure::dataframe::DType::*;
pub use crate::structure::matrix::UPLO::{Lower, Upper};
pub use crate::traits::matrix::UPLO::{Lower, Upper};
pub use crate::traits::matrix::{
Form::{Diagonal, Identity},
SolveKind::{LU, WAZ},
Expand Down
3 changes: 2 additions & 1 deletion src/prelude/simpler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ use crate::structure::dataframe::{DataFrame, WithParquet};
use crate::structure::matrix::Matrix;
use crate::structure::polynomial;
use crate::traits::math::{Norm, Normed};
use crate::traits::matrix::{Form, LinearAlgebra, MatrixTrait, SolveKind, PQLU, QR, WAZD};
#[allow(unused_imports)]
use crate::traits::matrix::{Form, LinearAlgebra, MatrixTrait, SolveKind, PQLU, QR, WAZD, UPLO};
#[cfg(feature = "parquet")]
use arrow2::io::parquet::write::CompressionOptions;
#[cfg(feature = "parquet")]
Expand Down
11 changes: 3 additions & 8 deletions src/structure/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,10 @@ use crate::traits::{
fp::{FPMatrix, FPVector},
general::Algorithm,
math::{InnerProduct, LinearOp, MatrixProduct, Norm, Normed, Vector},
matrix::{Form, LinearAlgebra, MatrixTrait, SolveKind, PQLU, QR, SVD, WAZD},
matrix::{Form, LinearAlgebra, MatrixTrait, SolveKind, PQLU, QR, SVD, WAZD, UPLO},
mutable::MutMatrix,
};
#[allow(unused_imports)]
use crate::util::{
low_level::{copy_vec_ptr, swap_vec_ptr},
non_macro::{cbind, eye, rbind, zeros},
Expand Down Expand Up @@ -3538,6 +3539,7 @@ impl LinearAlgebra<Matrix> for Matrix {
Some(dgrf) => match dgrf.status {
LAPACK_STATUS::Singular => panic!("Try solve for Singluar matrix"),
LAPACK_STATUS::NonSingular => {
let b = b.to_vec();
lapack_dgetrs(&dgrf, &(b.into())).unwrap().into()
}
},
Expand Down Expand Up @@ -4238,13 +4240,6 @@ pub enum POSITIVE_STATUS {
Failed(i32),
}

#[allow(non_camel_case_types)]
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub enum UPLO {
Upper,
Lower,
}

/// Temporary data structure from `dgetrf`
#[derive(Debug, Clone)]
pub struct DGETRF {
Expand Down
5 changes: 2 additions & 3 deletions src/structure/sparse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

use crate::structure::matrix::Matrix;
use crate::traits::math::LinearOp;
use crate::traits::matrix::{Form, LinearAlgebra, SolveKind, PQLU, QR, SVD, WAZD};
#[allow(unused_imports)]
use crate::traits::matrix::{Form, LinearAlgebra, SolveKind, PQLU, QR, SVD, WAZD, UPLO};
//use crate::traits::math::{InnerProduct, LinearOp, Norm, Normed, Vector};
#[cfg(feature = "O3")]
use crate::fuga::UPLO;
use crate::util::non_macro::zeros;
use std::ops::Mul;

Expand Down
7 changes: 7 additions & 0 deletions src/traits/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ pub enum SolveKind {
WAZ,
}

#[allow(non_camel_case_types)]
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub enum UPLO {
Upper,
Lower,
}

impl<M: MatrixTrait> QR<M> {
pub fn q(&self) -> &M {
&self.q
Expand Down

0 comments on commit 768c4e8

Please sign in to comment.