dyng
DynamicGraphLayout
cooling.h
1 /*
2  Copyright 2020 František Bráblík
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 */
16 #pragma once
17 
18 #include <functional>
19 #include <utility> // std::move
20 
21 namespace dyng {
22 
24 
27 struct cooling {
28  unsigned iterations;
29  float start_temperature;
30  std::function<float(float)> anneal;
31 
32  cooling(unsigned iterations, float start_temperature, std::function<float(float)> anneal)
33  : iterations(iterations)
34  , start_temperature(start_temperature)
35  , anneal(std::move(anneal)) {}
36 };
37 
38 } // namespace dyng
dyng::cooling
Structure representing a cooling strategy.
Definition: cooling.h:27