getContribution
Returns a specified scoring contribution.
The final score for a match (as retrieved through the getScore method) can be the product of multiple scoring contributions. For some entities the score is then normalized (for example so that it is always a value between 0 and 1).
Syntax
edkmatch:getContribution(index)
Arguments
| Argument | Description |
|---|---|
index
|
The number of the contribution to get (where the first contribution has the index zero). |
Returns
The scoring contribution.
Example
The following example demonstrates how to obtain scoring contributions:
function processmatch(edkmatch)
local contributionsCount = edkmatch:getContributionsCount()
print ("Contributions count: ", contributionsCount)
if contributionsCount >= 1 then
for i=0, contributionsCount-1, 1 do
local contribution = edkmatch:getContribution(i)
print ("Contribution " .. i .. ": " , contribution)
end
end
print ("Score: " , edkmatch:getScore())
return true
end
This script produces output similar to:
Contributions count: 4.0 Contribution 0: 1.0 Contribution 1: 0.75 Contribution 2: 1.0 Contribution 3: 0.6 Score: 0.45