Skip to content

Commit

Permalink
Merge pull request #445 from cicirello/patch-deprecate
Browse files Browse the repository at this point in the history
Deprecated shifted fitness variations of fitness weighed selection operators
  • Loading branch information
cicirello authored Jul 29, 2022
2 parents 36208c7 + 58bdb70 commit 11e3d8a
Show file tree
Hide file tree
Showing 12 changed files with 148 additions and 120 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

### Deprecated
* ShiftedFitnessProportionalSelection, replaced by combination of FitnessShifter with FitnessProportionalSelection.
* ShiftedStochasticUniversalSampling, replaced by combination of FitnessShifter with StochasticUniversalSampling.
* BiasedShiftedFitnessProportionalSelection, replaced by combination of FitnessShifter with BiasedFitnessProportionalSelection.
* BiasedShiftedStochasticUniversalSampling, replaced by combination of FitnessShifter with BiasedStochasticUniversalSampling.

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
*
* <p><b>This selection operator requires positive fitness values. Behavior is undefined if any
* fitness values are less than or equal to 0.</b> If your fitness values may be negative,
* use {@link BiasedShiftedFitnessProportionalSelection} instead.</p>
* you can use {@link FitnessShifter}, which transforms fitness values such that minimum fitness
* equals 1.</p>
*
* <p>The runtime to select M population members from a population of size N is
* O(N + M lg N), assuming the bias function has a constant runtime.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@
* <p>The runtime to select M population members from a population of size N is
* O(N + M lg N), assuming the bias function has a constant runtime.</p>
*
* @deprecated Instead of this class, you should use a combination of {@link FitnessShifter} and
* {@link BiasedFitnessProportionalSelection}. This class is scheduled for removal in release 6.0.0.
*
* @author <a href=https://www.cicirello.org/ target=_top>Vincent A. Cicirello</a>,
* <a href=https://www.cicirello.org/ target=_top>https://www.cicirello.org/</a>
*/
@Deprecated
public final class BiasedShiftedFitnessProportionalSelection extends FitnessProportionalSelection {

private final FitnessBiasFunction bias;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,13 @@
* O(N + M), which includes the need to generate only a single random double, and O(M) ints. This assumes
* that the bias function has a constant runtime.</p>
*
* @deprecated Instead of this class, you should use a combination of {@link FitnessShifter} and
* {@link BiasedStochasticUniversalSampling}. This class is scheduled for removal in release 6.0.0.
*
* @author <a href=https://www.cicirello.org/ target=_top>Vincent A. Cicirello</a>,
* <a href=https://www.cicirello.org/ target=_top>https://www.cicirello.org/</a>
*/
@Deprecated
public final class BiasedShiftedStochasticUniversalSampling extends StochasticUniversalSampling {

private final FitnessBiasFunction bias;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
*
* <p><b>This selection operator requires positive fitness values. Behavior is undefined if any
* fitness values are less than or equal to 0.</b> If your fitness values may be negative,
* use {@link BiasedShiftedStochasticUniversalSampling} instead.</p>
* you can use {@link FitnessShifter}, which transforms fitness values such that minimum fitness
* equals 1.</p>
*
* <p>The runtime to select M population members from a population of size N is
* O(N + M), which includes the need to generate only a single random double, and O(M) ints. This assumes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
*
* <p><b>This selection operator requires positive fitness values. Behavior is undefined if any
* fitness values are less than or equal to 0.</b> If your fitness values may be negative,
* use {@link ShiftedFitnessProportionalSelection} instead.</p>
* you can use {@link FitnessShifter}, which transforms fitness values such that minimum fitness
* equals 1.</p>
*
* <p>The runtime to select M population members from a population of size N is
* O(N + M lg N).</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@
* <p>The runtime to select M population members from a population of size N is
* O(N + M lg N).</p>
*
* @deprecated Instead of this class, you should use a combination of {@link FitnessShifter} and
* {@link FitnessProportionalSelection}. This class is scheduled for removal in release 6.0.0.
*
* @author <a href=https://www.cicirello.org/ target=_top>Vincent A. Cicirello</a>,
* <a href=https://www.cicirello.org/ target=_top>https://www.cicirello.org/</a>
*/
@Deprecated
public final class ShiftedFitnessProportionalSelection extends FitnessProportionalSelection {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@
* <p>The runtime to select M population members from a population of size N is
* O(N + M), which includes the need to generate only a single random double, and O(M) ints.</p>
*
* @deprecated Instead of this class, you should use a combination of {@link FitnessShifter} and
* {@link StochasticUniversalSampling}. This class is scheduled for removal in release 6.0.0.
*
* @author <a href=https://www.cicirello.org/ target=_top>Vincent A. Cicirello</a>,
* <a href=https://www.cicirello.org/ target=_top>https://www.cicirello.org/</a>
*/
@Deprecated
public final class ShiftedStochasticUniversalSampling extends StochasticUniversalSampling {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
*
* <p><b>This selection operator requires positive fitness values. Behavior is undefined if any
* fitness values are less than or equal to 0.</b> If your fitness values may be negative,
* use {@link ShiftedStochasticUniversalSampling} instead.</p>
* you can use {@link FitnessShifter}, which transforms fitness values such that minimum fitness
* equals 1.</p>
*
* <p>The runtime to select M population members from a population of size N is
* O(N + M), which includes the need to generate only a single random double, and O(M) random ints.</p>
Expand Down
Loading

0 comments on commit 11e3d8a

Please sign in to comment.