interface Replacement
See original GitHub issueHi, I think it is necessary to add an input parameter, sizeOfTheResultingSolutionList , to the replace
function below, so that the algorithm designer can operate more flexibly.
package org.uma.jmetal.component.replacement;
import org.uma.jmetal.solution.Solution;
import java.util.List;
@FunctionalInterface
public interface Replacement<S extends Solution<?>> {
enum RemovalPolicy {sequential, oneShot}
List<S> replace(List<S> currentList, List<S> offspringList) ;
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
VR Cover Facial Interface & Foam Replacement Set for ...
Facial Interface by VR Cover. Designed to fit perfectly on the Meta / Oculus Quest 2 headset, it can be easily installed to...
Read more >Meta Quest 2 VR Cover Facial Interface & Foam Replacement ...
Shop the VR cover facial interface and foam replacement set for your Meta Quest 2 headset. Hygienic PU leather foam pads keep your...
Read more >Valve Index Interface & Foam Replacement Basic Set
Designed to fully replace the original face gasket, each set gives you a magnetic facial interface, two memory foam replacements – Standard and...
Read more >Radio Replacement - PAC Audio
Radio replacement interface with Built-in OnStar Retention, Steering Wheel Control Retention and Navigation Outputs ...
Read more >Metra Car Audio Replacement Interface for Select Mazda ...
Shop Metra Car Audio Replacement Interface for Select Mazda Vehicles Red at Best Buy. Find low everyday prices and buy online for delivery...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I see the issue. The point is that I’m assuming the default case in which the size of the population in the next generation is the same as the size of the population passed as the first parameter to the
replace()
method.Adding the parameter you need to the `RankingAndDensityEstimatorReplacement() is easy; just let me think about it. On the one hand, I dislike needing to add classes such as the one you mention but, on the other hand, I don’t want to make the existing class more complex than necessary.
Hi @dongzhiming. Thanks for your comment. That parameter is not included in the
replace()
method because it is not always needed (see for example theRankingAndDensityEstimatorReplacement()
class) and anyway it can be a parameter of the constructor of the replacement class (as done in classMOEADReplacement()
).If you find a situation where this last approach does not work, please let me know.
Antonio