Skip to content

Commit

Permalink
0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperFluffy committed Jan 22, 2018
1 parent 1770f86 commit dadb5aa
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 13 deletions.
19 changes: 8 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
[package]
name = "gram-schmidt"
version = "0.3.1"
name = "gramschmidt"
version = "0.4.0"
authors = ["Richard Janis Goldschmidt <[email protected]>"]
license = "MIT"
description = "Classical, Modified, Reorthogonalized Gram Schmidt Orthogonalization and QR decompostion"
keywords = ["gramschmidt", "qr", "cgs", "mgs", "cgs2"]
categories = ["science", "algorithms"]
repository = "https://github.com/SuperFluffy/gramschmidt-rs"
readme = "README.md"

[dependencies]
ndarray = "0.11"
Expand All @@ -10,19 +16,10 @@ ndarray = "0.11"
version = "0.1.5"
default-features = false

# [dependencies.ndarray-parallel]
# version = "0.7"
# optional = true

[dev-dependencies]
lazy_static = "1.0"
ndarray-rand = "0.7"
rand = "0.4"

[dev-dependencies.openblas-src]
version = "0.5.6"

# [features]
# parallel = ["ndarray-parallel"]

# test = ["parallel"]
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,46 @@
# Gram Schmidt Orthonormalizatoin

Orthogonalization and normalization of matrices in the Rust programming language and `rust-ndarray`.
Orthogonalization and QR decomposition of matrices in the Rust programming language and `rust-ndarray`.

To be included in `linxal`.
This crate provides the following methods:

+ Classical Gram Schmidt, `cgs`,
+ Modified Gram Schmidt, `mgs`,
+ Classical Gram Schmidt with Reorthogonalization, `cgs2`.

# Usage

```rust
extern crate gramschmidt;
extern crate ndarray;

// Import openblas_src or another blas source to have the linker find all symbols.
extern crate openblas_src;

fn main() {
let small_matrix = arr2(
&[[2.0, 0.5, 0.0, 0.0],
[0.0, 0.3, 0.0, 0.0],
[0.0, 1.0, 0.7, 0.0],
[0.0, 0.0, 0.0, 3.0]]
);
let mut cgs2 = ReorthogonalizedGramSchmidt::from_matrix(&small_matrix);
cgs2.compute(&small_matrix);
assert!(small_matrix.all_close(&cgs2.q().dot(cgs2.r()), 1e-14));
}
```

# Recent versions

+ `0.4.0`: Major rework of the library structure:
+ The algorithms are now configured via structs, the traits are dropped.
+ Provide the structs `ClassicalGramSchmidt`, `ModifiedGramSchmidt`, and
`ReorthogonalizedGramSchmidt` (known as `cgs`, `mgs`, and `cgs2` in the
literature, respectively);
+ `cgs` and `cgs2` are implemented using `blas` routines (major speedup!);
+ All routines are now able to handle column-major (Fortran-) and row-major (C-) order
of the input matrices;
+ Remove parallel code.
+ `0.3.1`: Update to `blas 0.16` and do not specify a default backend (so that the user can set it).
+ `0.3.0`: Update to `ndarray 0.10`, `ndarray-parallel 0.5`
+ `0.2.1`: Added a parallelized algorithm using `rayon`
Expand Down

0 comments on commit dadb5aa

Please sign in to comment.