/** * Get a weighted sum score, weight for bucket i: w(i) = factor^i. * @param factor * @return */ public final float score(final float factor) { return sliceScore(0, buckets.length, factor); }
/** * Get score from start on, with factor. * @param start This is included. * @param factor * @return */ public final float trailingScore(final int start, float factor) { return sliceScore(start, buckets.length, factor); }
/** * Get score of first end buckets, with factor. * @param end Number of buckets including start. The end is not included. * @param factor * @return */ public final float leadingScore(final int end, float factor) { return sliceScore(0, end, factor); }
sum += data.attackFrequencySeconds.sliceScore(2, 4, 1f); limit = cc.attackFrequencyLimitSecondsTwo; if (sum - limit > maxVL) { sum += data.attackFrequencySeconds.sliceScore(4, 8, 1f); limit = cc.attackFrequencyLimitSecondsFour; if (sum - limit > maxVL) { sum += data.attackFrequencySeconds.sliceScore(8, 16, 1f); limit = cc.attackFrequencyLimitSecondsEight; if (sum - limit > maxVL) {