|
1 |
| -// OptFrame 4.2 - Optimization Framework |
2 |
| -// Copyright (C) 2009-2021 - MIT LICENSE |
3 |
| -// https://github.com/optframe/optframe |
4 |
| -// |
5 |
| -// Permission is hereby granted, free of charge, to any person obtaining |
6 |
| -// a copy of this software and associated documentation files (the "Software"), |
7 |
| -// to deal in the Software without restriction, including without limitation |
8 |
| -// the rights to use, copy, modify, merge, publish, distribute, sublicense, |
9 |
| -// and/or sell copies of the Software, and to permit persons to whom the |
10 |
| -// Software is furnished to do so, subject to the following conditions: |
11 |
| -// |
12 |
| -// The above copyright notice and this permission notice shall be included |
13 |
| -// in all copies or substantial portions of the Software. |
14 |
| -// |
15 |
| -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
16 |
| -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
17 |
| -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
18 |
| -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
19 |
| -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
20 |
| -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
21 |
| -// THE SOFTWARE. |
| 1 | +// SPDX-License-Identifier: LGPL-3.0-or-later OR MIT |
| 2 | +// Copyright (C) 2007-2025 - OptFrame - https://github.com/optframe/optframe |
22 | 3 |
|
23 | 4 | #ifndef OPTFRAME_GREEDY_RANDOMIZED_CONSTRUCTIVE_H_
|
24 | 5 | #define OPTFRAME_GREEDY_RANDOMIZED_CONSTRUCTIVE_H_
|
25 | 6 |
|
| 7 | +#if (__cplusplus < 202302L) || defined(NO_CXX_MODULES) |
| 8 | + |
26 | 9 | #include <OptFrame/Core/Constructive.hpp>
|
27 | 10 | #include <OptFrame/Helper/Solution.hpp>
|
28 | 11 |
|
29 | 12 | #include "GRASPFamily.h"
|
30 | 13 |
|
| 14 | +#define MOD_EXPORT |
| 15 | +#else |
| 16 | + |
| 17 | +// CANNOT IMPORT HERE... Already part of optframe.core |
| 18 | +/* |
| 19 | +import std; |
| 20 | +import optframe.component; |
| 21 | +import optframe.concepts; |
| 22 | +*/ |
| 23 | + |
| 24 | +// do NOT export modules on .hpp... only on .cppm |
| 25 | + |
| 26 | +#define MOD_EXPORT export |
| 27 | + |
| 28 | +#endif |
| 29 | + |
31 | 30 | namespace optframe {
|
32 | 31 |
|
33 | 32 | // Greedy Randomized Constructive
|
34 |
| -template <XSolution S> |
| 33 | +MOD_EXPORT template <XSolution S> |
35 | 34 | class GRConstructive : public Constructive<S>, public GRASP {
|
36 | 35 | public:
|
37 | 36 | virtual ~GRConstructive() {}
|
|
0 commit comments