A step of the miprgr_native implementation. No other function in the package calls it.
See the file header for the source the module follows.
Usage
miprgr_enumerate_integer(A, b, c, integer_vars, upper = 10, maximise = TRUE)
Arguments
- A
A matrix; indexed by row and column.
- b
A vector; indexed elementwise.
- c
A vector; its length is taken.
- integer_vars
Coerced to integer by the body, with as.integer.
- upper
Coerced to integer by the body, with as.integer. Defaults to 10.
- maximise
A flag; the body branches on it. Defaults to TRUE.
Value
A list with value, x, note.
Examples
A <- matrix(c(6, 4, 1, 2), 2, byrow = TRUE)
miprgr_enumerate_integer(A, b = c(24, 6), c = c(5, 4), integer_vars = c(1, 2), upper = 6)[c("value", "x")]
#> $value
#> [1] 20
#>
#> $x
#> [1] 4 0
#>