Skip to content

Commit

Permalink
Merge branch 'hotfix/0.16.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidfrontier45 committed Sep 2, 2024
2 parents 5c66041 + c1b5be3 commit 73d0274
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ categories = ["algorithms"]
repository = "https://github.com/lucidfrontier45/localsearch"
license-file = "LICENSE"
readme = "README.md"
version = "0.16.0"
version = "0.16.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
1 change: 0 additions & 1 deletion examples/quadratic_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ impl QuadraticModel {

fn evaluate_solution(&self, solution: &SolutionType) -> NotNan<f64> {
let score = (0..self.k)
.into_iter()
.map(|i| (solution[i] - self.centers[i]).powf(2.0))
.sum();
NotNan::new(score).unwrap()
Expand Down
3 changes: 0 additions & 3 deletions examples/tsp_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ impl OptModel for TSPModel {
.distance_matrix
.keys()
.copied()
.into_iter()
.flat_map(|(i, j)| [i, j])
.collect::<HashSet<_>>()
.into_iter()
Expand Down Expand Up @@ -235,7 +234,6 @@ fn main() {
let input_file = args.get(1).unwrap();
let coords = read_lines(input_file)
.unwrap()
.into_iter()
.map(|line| {
let line = line.unwrap();
let splt = line.split(' ').collect::<Vec<_>>();
Expand Down Expand Up @@ -363,7 +361,6 @@ fn main() {
let opt_route_file = args.get(2).unwrap();
let opt_solution = read_lines(opt_route_file)
.unwrap()
.into_iter()
.map(|line| {
let i: usize = line.unwrap().parse().unwrap();
i
Expand Down
1 change: 1 addition & 0 deletions src/optim/simulated_annealing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ impl SimulatedAnnealingOptimizer {
}

impl SimulatedAnnealingOptimizer {
#[allow(clippy::too_many_arguments)]
/// Start optimization with given temperature range
///
/// - `model` : the model to optimize
Expand Down
1 change: 1 addition & 0 deletions src/optim/tabu_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ where
M: OptModel,
T: TabuList<M>,
{
#[allow(clippy::too_many_arguments)]
/// Start optimization
///
/// - `model` : the model to optimize
Expand Down
1 change: 0 additions & 1 deletion src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ impl QuadraticModel {

fn evaluate_solution(&self, solution: &SolutionType) -> ScoreType {
let score = (0..self.k)
.into_iter()
.map(|i| (solution[i] - self.centers[i]).powf(2.0))
.sum();
NotNan::new(score).unwrap()
Expand Down

0 comments on commit 73d0274

Please sign in to comment.