WIP: страницы для правил #62

Closed
Ghost wants to merge 132 commits from master into 61-rules-pages
Showing only changes of commit c39bc3c6ca - Show all commits

View File

@ -116,7 +116,9 @@ public class FuzzyInferenceService {
if (outputVariable != null) { if (outputVariable != null) {
outputVariable.defuzzify(); 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(); //return outputVariable == null ? "" : outputVariable.fuzzyOutputValue();
} }
} }