mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-28 20:17:42 +01:00
Fixed ArithmetricException in AnalysisUtils #438
This commit is contained in:
parent
34069d2477
commit
b1e82f7ebc
@ -186,23 +186,26 @@ public class AnalysisUtils {
|
||||
|
||||
double probability = 1.0;
|
||||
|
||||
int stickM = 0;
|
||||
for (StickyData stickyData : stickyStuckM) {
|
||||
if (similarM.contains(stickyData)) {
|
||||
stickM++;
|
||||
if (!similarM.isEmpty()) {
|
||||
int stickM = 0;
|
||||
for (StickyData stickyData : stickyStuckM) {
|
||||
if (similarM.contains(stickyData)) {
|
||||
stickM++;
|
||||
}
|
||||
}
|
||||
probability *= (stickM / similarM.size());
|
||||
}
|
||||
|
||||
probability *= (stickM / similarM.size());
|
||||
|
||||
int stickW = 0;
|
||||
for (StickyData stickyData : stickyStuckW) {
|
||||
if (similarW.contains(stickyData)) {
|
||||
stickW++;
|
||||
if (!similarW.isEmpty()) {
|
||||
int stickW = 0;
|
||||
for (StickyData stickyData : stickyStuckW) {
|
||||
if (similarW.contains(stickyData)) {
|
||||
stickW++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
probability *= (stickW / similarW.size());
|
||||
probability *= (stickW / similarW.size());
|
||||
}
|
||||
return probability;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user