Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mcychan authored Nov 17, 2023
1 parent 78c445f commit de18981
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/nQuant/j2se/PnnLABGAQuantizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ private void calculateError(double[] errors) {

private void calculateFitness() {
final String ratioKey = getRatioKey();
if(_fitnessMap.containsKey(ratioKey)) {
_objectives = _fitnessMap.get(ratioKey);
final double[] objectives = _fitnessMap.get(ratioKey);
if(objectives != null) {
_objectives = objectives;
_fitness = -1 * Arrays.stream(_objectives).sum();
return;
}
Expand Down

0 comments on commit de18981

Please sign in to comment.