This is more of a maths question rather than pure java.
I need to have my application calculate the impact of something. Every time an error has occurred at a location it is counted. So for example:
Location A:1
Location B:1
Location C:1
Location D:3
Locations A-C have had one error each and location D has had 3.
Calculating the sum is easy but what I need is an algorithm that takes into account the fact that a location has had the error several times and therefore see this as a bigger issue.
An error can only be reported up to 100 times in one location. In the case of the above example, rather than the result being 6 it should be more due to location D. If each location only has 1 reported errors the result would be 4.
What would be the best way to calculate this?
I need to have my application calculate the impact of something. Every time an error has occurred at a location it is counted. So for example:
Location A:1
Location B:1
Location C:1
Location D:3
Locations A-C have had one error each and location D has had 3.
Calculating the sum is easy but what I need is an algorithm that takes into account the fact that a location has had the error several times and therefore see this as a bigger issue.
An error can only be reported up to 100 times in one location. In the case of the above example, rather than the result being 6 it should be more due to location D. If each location only has 1 reported errors the result would be 4.
What would be the best way to calculate this?