Skip to content

Commit

Permalink
Switch to Rust 2021 Edition
Browse files Browse the repository at this point in the history
  • Loading branch information
msk committed May 20, 2024
1 parent 855335b commit b21a33b
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
rust: [stable, 1.54]
rust: [stable, 1.56]

steps:
- name: Install Rust
Expand Down
48 changes: 24 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Versioning](https://semver.org/spec/v2.0.0.html).
### Changed

* Updated intel-mkl-src to 0.7.
* Requires Rust 1.54 or later.
* Requires Rust 1.56 or later.

## [0.6.2] - 2022-05-04

Expand All @@ -22,89 +22,89 @@ Versioning](https://semver.org/spec/v2.0.0.html).

### Changed

- Requires ndarray 0.15.2 or later.
* Requires ndarray 0.15.2 or later.

## [0.6.0] - 2021-05-10

### Changed

- Requires ndarray 0.15.
- `DecompisionError::InvalidInput` provides the underlying reason.
- `DecomposionError::LinalgError` no longer exposes the `ndarray_linalg` error
* Requires ndarray 0.15.
* `DecompisionError::InvalidInput` provides the underlying reason.
* `DecomposionError::LinalgError` no longer exposes the `ndarray_linalg` error
type; instead, it provides the underlying reason as `String`.
- Requires Rust 1.51 or later.
* Requires Rust 1.51 or later.

## [0.5.1] - 2021-05-06

### Added

- `PcaBuilder` and `RandomizedPcaBuilder` to create instances of `Pca` and
* `PcaBuilder` and `RandomizedPcaBuilder` to create instances of `Pca` and
`RandomizedPca`, respectively.
- `FastIcaBuilder` to create instances of `FastIca`.
- `Pca` and `RandomizedPca` are optionally set to skip mean-centering input,
* `FastIcaBuilder` to create instances of `FastIca`.
* `Pca` and `RandomizedPca` are optionally set to skip mean-centering input,
using `PcaBuilder::centering` and `RandomizedPcaBuilder::centering`. By
default they always mean-center input. (by @sstadick)

## [0.5.0] - 2021-05-02

### Changed

- Updated ndarray to 0.14. (by @sstadick)
- The backend features are compatible with those of ndarray-linalg-0.13.
- Requires Rust 1.46 or later.
* Updated ndarray to 0.14. (by @sstadick)
* The backend features are compatible with those of ndarray-linalg-0.13.
* Requires Rust 1.46 or later.

## [0.4.1] - 2020-07-17

### Added

- `Pca::components()` and `RandomizedPca::components()`.
- `Pca::mean()` and `RandomizedPca::mean()`.
- `Pca::inverse_transform()` and `RandomizedPca::inverse_transform()`.
* `Pca::components()` and `RandomizedPca::components()`.
* `Pca::mean()` and `RandomizedPca::mean()`.
* `Pca::inverse_transform()` and `RandomizedPca::inverse_transform()`.

## [0.4.0] - 2020-06-18

### Added

- Serialization/deserialization using serde.
- `FastIca::with_seed` and `RandomizedPca::with_seed` to easily create a model
* Serialization/deserialization using serde.
* `FastIca::with_seed` and `RandomizedPca::with_seed` to easily create a model
with a reproducible behavior.
- `FastIca::with_rng` and `RandomizedPca::with_rng` to replace `new` in earlier
* `FastIca::with_rng` and `RandomizedPca::with_rng` to replace `new` in earlier
versions.

### Changed

- `FastIca::new` and `RandomizedPca::new` no longer requires a random number
* `FastIca::new` and `RandomizedPca::new` no longer requires a random number
generator; they uses a PCG random number genrator by default. Use `with_rng`
instead for a different random number generator.

## [0.3.0] - 2020-06-05

### Added

- `FastIca`, an independent component analysis (ICA) algorithm.
* `FastIca`, an independent component analysis (ICA) algorithm.

## [0.2.0] - 2020-05-24

### Added

- `RandomizedPca`, a randomized, truncated PCA.
* `RandomizedPca`, a randomized, truncated PCA.

### Fixed

- `Pca::explained_variance_ratio` returns the ratios for the principal
* `Pca::explained_variance_ratio` returns the ratios for the principal
components only.

## [0.1.1] - 2020-05-21

### Added

- cargo features to select the LAPACK backend: intel-mkl, netlib, or openblas.
* cargo features to select the LAPACK backend: intel-mkl, netlib, or openblas.

## [0.1.0] - 2020-05-20

### Added

- Principal component analysis (PCA).
* Principal component analysis (PCA).

[Unreleased]: https://github.com/petabi/petal-decomposition/compare/0.6.2...main
[0.6.2]: https://github.com/petabi/petal-decomposition/compare/0.6.1...0.6.2
Expand Down
19 changes: 11 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ license = "Apache-2.0"
keywords = ["matrix", "decomposition", "pca", "ica", "dimensionality"]
categories = ["mathematics", "science", "algorithms"]
authors = ["Min Kim <[email protected]>"]
edition = "2018"
edition = "2021"
exclude = ["./github"]

[badges]
Expand All @@ -25,14 +25,17 @@ no-default-features = true
default = []

intel-mkl = ["intel-mkl-static"]
netlib = ["netlib-static"]
openblas = ["openblas-static"]
netlib = ["netlib-static"]
openblas = ["openblas-static"]

intel-mkl-static = ["intel-mkl-src/mkl-static-lp64-seq", "intel-mkl-src/download"]
intel-mkl-static = [
"intel-mkl-src/mkl-static-lp64-seq",
"intel-mkl-src/download",
]
intel-mkl-system = ["intel-mkl-src/mkl-dynamic-lp64-seq"]

netlib-static = ["netlib-src/static"]
netlib-system = ["netlib-src/system"]
netlib-static = ["netlib-src/static"]
netlib-system = ["netlib-src/system"]

openblas-static = ["openblas-src/static"]
openblas-system = ["openblas-src/system"]
Expand All @@ -42,7 +45,7 @@ serialization = [
"lair/serialization",
"ndarray/serde",
"rand/serde1",
"rand_pcg/serde1"
"rand_pcg/serde1",
]

[dependencies]
Expand All @@ -53,7 +56,7 @@ lair = "0.6"
lapack = "0.19"
ndarray = "0.15.2"
num-complex = "0.4"
num-traits = "0.2.15" # 0.2.15 conflicts with lair-0.5
num-traits = "0.2.15" # 0.2.15 conflicts with lair-0.5
rand = "0.8"
rand_distr = "0.4"
rand_pcg = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ petal-decomposition provides matrix decomposition algorithms including PCA

## Requirements

* Rust ≥ 1.54
* Rust ≥ 1.56
* BLAS/LAPACK backend (OpenBLAS, Netlib, or Intel MKL)

## Features
Expand Down

0 comments on commit b21a33b

Please sign in to comment.