diff --git a/main.cpp b/main.cpp index c3b87ee..9d512e6 100644 --- a/main.cpp +++ b/main.cpp @@ -23,7 +23,7 @@ int main() } sa::solution act = sa::solution::simulated_annealing(capacity, items, - TEMP, ALPHA); + TEMP, ALPHA); act.print_sol(); } diff --git a/sa.cpp b/sa.cpp index a2f7d47..bb96228 100644 --- a/sa.cpp +++ b/sa.cpp @@ -2,7 +2,7 @@ #include auto sa::solution::simulated_annealing(int capacity, const std::vector &items, - const double alpha, double temp)->sa::solution + const double alpha, double temp)->sa::solution { sa::solution best(items, capacity); best.randomize(); diff --git a/sa.hpp b/sa.hpp index a9dd6cc..d67713a 100644 --- a/sa.hpp +++ b/sa.hpp @@ -44,8 +44,8 @@ class solution { solution() = default; solution(const std::vector &items, int capacity): // Gera a solução inicial - items(items), gen(std::random_device()()), capacity(capacity), - fitness(calculate_boxes()) {} + items(items), gen(std::random_device()()), capacity(capacity), + fitness(calculate_boxes()) {} void setneighbor() { // Gera um vizinho da solução std::uniform_int_distribution<> dist(0, items.size() - 1); @@ -93,7 +93,7 @@ class solution { } static auto simulated_annealing(int capacity, const std::vector &items, - double alpha, double temp)->solution; + double alpha, double temp)->solution; }; } // namespace sa