This method returns a selector of value assignments to a variable that selects at least minNumber values having the largest evaluation according to the evaluator eval. The parameter minNumber must be at least 1.

Namespace: ILOG.CP
Assembly: oplall (in oplall.dll)

Syntax

C#
public virtual IValueSelector SelectLargest(
	double minNumber,
	IIntValueEval e
)

Parameters

minNumber
Type: System..::..Double
e
Type: ILOG.CP..::..IIntValueEval

Remarks

For example, suppose that eight domain values (1-8) have evaluations (1) 5, (2) 8, (3) 3, (4) 9, (5) 2, (6) 8, (7) 1, (8) 7. When ordered by decreasing evaluation, this gives: (4) 9, (2) 8, (6) 8, (8) 7, (1) 5, (3) 3, (5) 2, (7) 1. If minNumber is 1, then value 4 would be selected, if it is 2 or 3, then values 2 and 6 would be selected, and if it is 4 then values 4, 2, 6, and 8 would be selected. Note that when minNumber is 2, both 2 and 6 are selected as both are considered equivalent. In addition, it is possible to specify a non-integer value of minNumber. In this case, at least floor(minNumber) selections are made, with probability minNumber - floor(minNumber) of selecting an additional value. It is still possible that this selector can select less domain values than minNumber if there are less than minNumber values supplied to it for selection, in which case all supplied values are selected.

See Also