(Internal) Sum scores of items in a solution that match a constraint
addScoreToConstraintData
is an internal function for summing the score of items in a solution that match a constraint.
addScoreToConstraintData(x, attrib, item_idx, item_resp, item_ncat)
x
: a data.frame
containing a single constraint data.attrib
: an item_attrib
object.item_idx
: item indices in the solution.item_resp
: scores of items in the solution.item_ncat
: number of score categories of items in the solution.addScoreToConstraintData
returns an updated data.frame
.