Update: Usage.c: Fix of usefulness calc that sometimes leaded to inf values
double Usage_usefulness(Usage *usage, long currentTime)
{
double age = currentTime - usage->lastUsed;
- double usefulnessToNormalize = ((double) usage->useCount) / age;
+ double usefulnessToNormalize = ((double) usage->useCount) / (age + 1.0);
return usefulnessToNormalize / (usefulnessToNormalize + 1.0);
}
