Skip to content

Commit

Permalink
Polish for publication
Browse files Browse the repository at this point in the history
  • Loading branch information
justinlovinger committed Sep 27, 2023
1 parent 28783d4 commit e09876c
Show file tree
Hide file tree
Showing 25 changed files with 111 additions and 57 deletions.
3 changes: 2 additions & 1 deletion .hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/sh

cargo readme -o README.md
cargo readme -r derive-bounded -o README.md
cargo readme -r derive-num-bounded -o README.md
cargo readme -r optimal-binary -o README.md
cargo readme -r optimal-core -o README.md
cargo readme -r optimal-pbil -o README.md
cargo readme -r optimal-steepest -o README.md
Expand Down
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
members = [
"derive-bounded",
"derive-num-bounded",
"optimal-binary",
"optimal-core",
"optimal-pbil",
Expand All @@ -9,7 +9,7 @@ members = [

[package]
name = "optimal"
version = "0.1.0"
version = "0.0.0"
edition = "2021"
authors = ["Justin Lovinger"]
description = "Mathematical optimization and machine learning framework and algorithms"
Expand All @@ -23,9 +23,9 @@ license = "MIT"
github = { repository = "justinlovinger/optimal-rs", workflow = "build" }

[dependencies]
optimal-core = { path = "optimal-core" }
optimal-pbil = { path = "optimal-pbil" }
optimal-steepest = { path = "optimal-steepest" }
optimal-core = { path = "optimal-core", version = "0.0.0" }
optimal-pbil = { path = "optimal-pbil", version = "0.0.0" }
optimal-steepest = { path = "optimal-steepest", version = "0.0.0" }
rand_xoshiro = "0.6.0"

[dev-dependencies]
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
[![Workflow Status](https://github.com/justinlovinger/optimal-rs/workflows/build/badge.svg)](https://github.com/justinlovinger/optimal-rs/actions?query=workflow%3A%22build%22)

Note,
this is currently highly experimental.
Expect frequent breaking changing
without proper versioning.
This notice will change
when stabilization begins.
This package is experimental.
Expect frequent updates to the repository
with breaking changes
and infrequent releases.

# optimal

Expand Down
10 changes: 4 additions & 6 deletions README.tpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{{badges}}

Note,
this is currently highly experimental.
Expect frequent breaking changing
without proper versioning.
This notice will change
when stabilization begins.
This package is experimental.
Expect frequent updates to the repository
with breaking changes
and infrequent releases.

# {{crate}}

Expand Down
3 changes: 0 additions & 3 deletions derive-bounded/README.md

This file was deleted.

9 changes: 6 additions & 3 deletions derive-bounded/Cargo.toml → derive-num-bounded/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
[package]
name = "derive-bounded"
version = "0.1.0"
name = "derive-num-bounded"
version = "0.0.0"
edition = "2021"
authors = ["Justin Lovinger"]
description = "Macros for implementing bounded number types"
repository = "https://github.com/justinlovinger/optimal-rs"
repository = "https://github.com/justinlovinger/optimal-rs/tree/master/derive-num-bounded"
readme = "README.md"
keywords = ["macro"]
categories = ["rust-patterns"]
license = "MIT"

[badges]
github = { repository = "justinlovinger/optimal-rs", workflow = "build" }

[dependencies]
paste = "1.0.14"
thiserror = "1.0.47"
Expand Down
11 changes: 10 additions & 1 deletion derive-num-bounded/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# derive-bounded
[![Workflow Status](https://github.com/justinlovinger/optimal-rs/workflows/build/badge.svg)](https://github.com/justinlovinger/optimal-rs/actions?query=workflow%3A%22build%22)

This package is experimental.
Expect frequent updates to the repository
with breaking changes
and infrequent releases.

# derive-num-bounded

Macros for implementing bounded number types.

License: MIT
1 change: 1 addition & 0 deletions derive-num-bounded/README.tpl
2 changes: 2 additions & 0 deletions derive-bounded/src/lib.rs → derive-num-bounded/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#![allow(unused_macros)]
#![allow(unused_imports)]

//! Macros for implementing bounded number types.

pub use paste;
pub use thiserror;

Expand Down
7 changes: 5 additions & 2 deletions optimal-binary/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
[package]
name = "optimal-binary"
version = "0.1.0"
version = "0.0.0"
edition = "2021"
authors = ["Justin Lovinger"]
description = "Utilities for working with binary optimizers"
repository = "https://github.com/justinlovinger/optimal-rs"
repository = "https://github.com/justinlovinger/optimal-rs/tree/master/optimal-binary"
readme = "README.md"
keywords = ["optimization", "binary"]
categories = ["science", "mathematics"]
license = "MIT"

[badges]
github = { repository = "justinlovinger/optimal-rs", workflow = "build" }

[features]
serde = ["dep:serde"]

Expand Down
12 changes: 12 additions & 0 deletions optimal-binary/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[![Workflow Status](https://github.com/justinlovinger/optimal-rs/workflows/build/badge.svg)](https://github.com/justinlovinger/optimal-rs/actions?query=workflow%3A%22build%22)

This package is experimental.
Expect frequent updates to the repository
with breaking changes
and infrequent releases.

# optimal-binary

Utilities for working with binary optimizers.

License: MIT
1 change: 1 addition & 0 deletions optimal-binary/README.tpl
2 changes: 2 additions & 0 deletions optimal-binary/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Utilities for working with binary optimizers.

use num_traits::{pow, One, Zero};
use std::ops::{Add, Div, Mul, RangeInclusive, Sub};

Expand Down
7 changes: 5 additions & 2 deletions optimal-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
[package]
name = "optimal-core"
version = "0.1.0"
version = "0.0.0"
edition = "2021"
authors = ["Justin Lovinger"]
description = "Mathematical optimization and machine learning framework"
repository = "https://github.com/justinlovinger/optimal-rs"
repository = "https://github.com/justinlovinger/optimal-rs/tree/master/optimal-core"
readme = "README.md"
keywords = ["ai", "machine-learning", "optimization"]
categories = ["science", "mathematics"]
license = "MIT"

[badges]
github = { repository = "justinlovinger/optimal-rs", workflow = "build" }

[dependencies]
blanket = "0.3.0"
streaming-iterator = "0.1.9"
Expand Down
2 changes: 2 additions & 0 deletions optimal-core/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Workflow Status](https://github.com/justinlovinger/optimal-rs/workflows/build/badge.svg)](https://github.com/justinlovinger/optimal-rs/actions?query=workflow%3A%22build%22)

# optimal-core

Core traits and types for Optimal.
Expand Down
11 changes: 7 additions & 4 deletions optimal-pbil/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
[package]
name = "optimal-pbil"
version = "0.1.0"
version = "0.0.0"
edition = "2021"
authors = ["Justin Lovinger"]
description = "Implementation of population-based incremental learning (PBIL)"
repository = "https://github.com/justinlovinger/optimal-rs"
repository = "https://github.com/justinlovinger/optimal-rs/tree/master/optimal-pbil"
readme = "README.md"
keywords = ["optimization", "pbil"]
categories = ["science", "mathematics"]
license = "MIT"

[badges]
github = { repository = "justinlovinger/optimal-rs", workflow = "build" }

[features]
serde = ["dep:serde", "rand/serde1", "rand_xoshiro/serde1"]

[dependencies]
derive-bounded = { path = "../derive-bounded" }
derive-num-bounded = { path = "../derive-num-bounded", version = "0.0.0" }
derive-getters = "0.3.0"
derive_more = "0.99.17"
num-traits = "0.2.16"
optimal-core = { path = "../optimal-core" }
optimal-core = { path = "../optimal-core", version = "0.0.0" }
partial-min-max = "0.4.0"
rand = "0.8.5"
rand_xoshiro = "0.6.0"
Expand Down
7 changes: 7 additions & 0 deletions optimal-pbil/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[![Workflow Status](https://github.com/justinlovinger/optimal-rs/workflows/build/badge.svg)](https://github.com/justinlovinger/optimal-rs/actions?query=workflow%3A%22build%22)

This package is experimental.
Expect frequent updates to the repository
with breaking changes
and infrequent releases.

# optimal-pbil

Population-based incremental learning (PBIL).
Expand Down
1 change: 1 addition & 0 deletions optimal-pbil/README.tpl
4 changes: 2 additions & 2 deletions optimal-pbil/src/types.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use core::convert::TryFrom;
use std::f64::EPSILON;

use derive_bounded::{
use derive_more::{Display, Into};
use derive_num_bounded::{
derive_from_str_from_try_into, derive_into_inner, derive_new_from_bounded_float,
derive_new_from_lower_bounded, derive_try_from_from_new,
};
use derive_more::{Display, Into};
use num_traits::bounds::{LowerBounded, UpperBounded};
use rand::distributions::Bernoulli;

Expand Down
11 changes: 7 additions & 4 deletions optimal-steepest/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
[package]
name = "optimal-steepest"
version = "0.1.0"
version = "0.0.0"
edition = "2021"
authors = ["Justin Lovinger"]
description = "Implementation of steepest descent optimizers"
repository = "https://github.com/justinlovinger/optimal-rs"
repository = "https://github.com/justinlovinger/optimal-rs/tree/master/optimal-steepest"
readme = "README.md"
keywords = ["optimization", "steepest-descent", "line-search"]
categories = ["science", "mathematics"]
license = "MIT"

[badges]
github = { repository = "justinlovinger/optimal-rs", workflow = "build" }

[features]
serde = ["dep:serde"]

[dependencies]
derive-bounded = { path = "../derive-bounded" }
derive-num-bounded = { path = "../derive-num-bounded", version = "0.0.0" }
derive-getters = "0.3.0"
derive_more = "0.99.17"
num-traits = "0.2.16"
optimal-core = { path = "../optimal-core" }
optimal-core = { path = "../optimal-core", version = "0.0.0" }
rand = "0.8.5"
replace_with = "0.1.7"
serde = { version = "1.0.185", features = ["derive"], optional = true }
Expand Down
7 changes: 7 additions & 0 deletions optimal-steepest/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[![Workflow Status](https://github.com/justinlovinger/optimal-rs/workflows/build/badge.svg)](https://github.com/justinlovinger/optimal-rs/actions?query=workflow%3A%22build%22)

This package is experimental.
Expect frequent updates to the repository
with breaking changes
and infrequent releases.

# optimal-steepest

Steepest descent optimizers.
Expand Down
1 change: 1 addition & 0 deletions optimal-steepest/README.tpl
4 changes: 2 additions & 2 deletions optimal-steepest/src/backtracking_steepest/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use std::{
ops::{Div, Mul, Sub},
};

use derive_bounded::{
use derive_more::Display;
use derive_num_bounded::{
derive_into_inner, derive_new_from_bounded_partial_ord,
derive_new_from_lower_bounded_partial_ord,
};
use derive_more::Display;
use num_traits::{
bounds::{LowerBounded, UpperBounded},
real::Real,
Expand Down
Loading

0 comments on commit e09876c

Please sign in to comment.