Fix indentation...
This commit is contained in:
parent
877ad0ad1a
commit
e045407993
2
main.cpp
2
main.cpp
@ -23,7 +23,7 @@ int main()
|
||||
}
|
||||
|
||||
sa::solution act = sa::solution::simulated_annealing(capacity, items,
|
||||
TEMP, ALPHA);
|
||||
TEMP, ALPHA);
|
||||
|
||||
act.print_sol();
|
||||
}
|
||||
|
||||
6
sa.hpp
6
sa.hpp
@ -44,8 +44,8 @@ class solution {
|
||||
solution() = default;
|
||||
|
||||
solution(const std::vector<long long> &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<long long> &items,
|
||||
double alpha, double temp)->solution;
|
||||
double alpha, double temp)->solution;
|
||||
};
|
||||
|
||||
} // namespace sa
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user