74-add-jFuzzyLogic #75

Merged
romanov73 merged 15 commits from 74-add-jFuzzyLogic into master 2022-11-28 01:00:07 +04:00
Showing only changes of commit c39bc3c6ca - Show all commits

View File

@ -116,7 +116,9 @@ public class FuzzyInferenceService {
if (outputVariable != null) {
outputVariable.defuzzify();
}
return outputVariable == null ? "" : outputVariable.highestMembership(outputVariable.getValue()).getSecond().getName();
return (outputVariable == null || Double.isNaN(outputVariable.getValue()))
? "Нет рекомендаций"
: outputVariable.highestMembership(outputVariable.getValue()).getSecond().getName();
//return outputVariable == null ? "" : outputVariable.fuzzyOutputValue();
}
}