This commit is contained in:
Anton Romanov 2022-10-25 16:51:51 +04:00
parent 5ef8599576
commit c39bc3c6ca

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();
}
}