Skip to content

Commit 8c6c61b

Browse files
committed
RLSE: Ver 0.30.11
* Cholesky Decomposition (#46) * Add `is_symmetric`
1 parent 7166f2f commit 8c6c61b

File tree

5 files changed

+37
-6
lines changed

5 files changed

+37
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "peroxide"
3-
version = "0.30.10"
3+
version = "0.30.11"
44
authors = ["axect <[email protected]>"]
55
edition = "2018"
66
description = "Rust comprehensive scientific computation library contains linear algebra, numerical analysis, statistics and machine learning tools with farmiliar syntax"

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ Peroxide can do many things.
128128
* LU Decomposition, Inverse matrix, Block partitioning
129129
* QR Decomposition (`O3` feature)
130130
* Singular Value Decomposition (SVD) (`O3` feature)
131+
* Cholesky Decomposition (`O3` feature)
131132
* Reduced Row Echelon form
132133
* Column, Row operations
133134
* Eigenvalue, Eigenvector
@@ -210,7 +211,7 @@ then Rust become great choice.
210211

211212
## Latest README version
212213

213-
Corresponding to `0.30.2`
214+
Corresponding to `0.30.11`
214215

215216
## Pre-requisite
216217

@@ -265,7 +266,7 @@ Corresponding to `0.30.2`
265266

266267
## Useful tips for features
267268

268-
* If you want to use `QR` or `SVD` then should use `O3` feature (there are no implementations for these decompositions in `default`)
269+
* If you want to use *QR* or *SVD* or *Cholesky Decomposition* then should use `O3` feature (there are no implementations for these decompositions in `default`)
269270
* If you want to write your numerical results, then use `nc` feature and `netcdf` format. (It is much more effective than `csv` and `json`.)
270271
* To plot, use `nc` feature to export data as netcdf format and use python to draw plot.
271272
* `plot` feature has limited plot abilities.

RELEASES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Release 0.30.11 (2022-02-10)
2+
3+
* Implement Cholesky decomposition in `O3` feature.
4+
* Implement symmetricity check method - `is_symmetric` for Matrix.
5+
16
# Release 0.30.10 (2022-02-05)
27

38
* Update `netcdf` dependency to `0.7`

src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
//! * Linear Algebra (with BLAS & LAPACK)
88
//! * [Matrix](structure/matrix/index.html) operations
99
//! * `+,-,*,/`
10-
//! * LU, Determinant, Inverse
10+
//! * LU Decomposition, Determinant, Inverse
1111
//! * QR Decomposition (`O3` feature needed)
1212
//! * Singular Value Decomposition (`O3` feature needed)
13+
//! * Cholesky Decomposition (`O3` feature needed)
1314
//! * Reduced Row Echelon Form
1415
//! * [Vector](structure/vector/index.html) operations
1516
//! * [Eigenvalue, Eigenvector](numerical/eigen/index.html) algorithms
@@ -80,7 +81,7 @@
8081
//! ### Cargo.toml
8182
//!
8283
//! * To use `peroxide`, you should edit `Cargo.toml`
83-
//! * Current document version is corresponding to `0.30.2`
84+
//! * Current document version is corresponding to `0.30.11`
8485
//!
8586
//! 1. Default
8687
//! ```toml
@@ -159,7 +160,7 @@
159160
//! ## Useful tips for features
160161
//!
161162
//! * After `0.28.0`, `dataframe` feature is replaced by `nc` feature.
162-
//! * If you want to use `QR` or `SVD` then should use `O3` feature (there are no implementations for these decompositions in `default`)
163+
//! * If you want to use *QR* or *SVD* or *Cholesky Decomposition* then should use `O3` feature (there are no implementations for these decompositions in `default`)
163164
//! * If you want to write your numerical results, then use `nc` feature and `netcdf` format. (It is much more effective than `csv` and `json`.)
164165
//! * After `0.23.0`, there are two options - `fuga`, `prelude`. Choose proper option for your computations.
165166
//! * To plot, use `nc` feature to export data as netcdf format and use python to draw plot.

src/structure/matrix.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,30 @@
561561
//! }
562562
//! ```
563563
//!
564+
//! ## Cholesky Decomposition
565+
//!
566+
//! * Use `dpotrf` of LAPACK
567+
//! * Return Matrix (But there can be panic! - Not symmetric or Not positive definite)
568+
//! * Example
569+
//!
570+
//! ```rust
571+
//! extern crate peroxide;
572+
//! use peroxide::fuga::*;
573+
//!
574+
//! fn main() {
575+
//! let a = ml_matrix("1 2;2 5");
576+
//! #[cfg(feature = "O3")]
577+
//! {
578+
//! let u = a.cholesky(Upper);
579+
//! assert_eq!(u, ml_matrix("1 2;0 1"));
580+
//!
581+
//! let l = a.cholesky(Lower);
582+
//! assert_eq!(l, ml_matrix("1 0;2 1"));
583+
//! }
584+
//! a.print();
585+
//! }
586+
//! ```
587+
//!
564588
//! ## Moore-Penrose Pseudo Inverse
565589
//!
566590
//! * $ X^\dagger = \left(X^T X\right)^{-1} X^T $

0 commit comments

Comments
 (0)