this repo has no description
at develop 907 B view raw
1/*** 2!Test 3solvers: [gecode] 4expected: !Result 5 status: SATISFIED 6 solution: !Solution 7 bool_output: 3 8 int_output: 1 9 float_output: 2 10 indexed_output: 4 11 enumed_output: "TWO" 12***/ 13 14% Base cases 15array[int] of int: bool_array = [false, false, true, true]; 16var int: bool_output ::add_to_output = arg_max(bool_array); 17 18array[int] of int: int_array = [-4,-5,-4]; 19var int: int_output ::add_to_output = arg_max(int_array); 20 21array[int] of float: float_array = [1.4, 4.3, 2.3, 4.2]; 22var int: float_output ::add_to_output = arg_max(float_array); 23 24% Test using arrays not starting at 1 25array[3..5] of int: indexed_array = array1d(3..5, [4,5,3]); 26var int: indexed_output ::add_to_output = arg_max(indexed_array); 27 28% Test using an enum as index 29enum TENUM = {ONE, TWO, THREE}; 30array[TENUM] of bool: enumed_array = [false, true, false]; 31var TENUM: enumed_output ::add_to_output = arg_max(enumed_array);