Comprehension
Create a Comprehension in MiniZinc
rminizinc::Expression
-> Comprehension
.generators
: a vector of generators
.expression
: the comprehension expression
.set
: TRUE if comprehension is a set
.delete_flag
: used to delete items
.generators
: a vector of generators
.expression
: the comprehension expression
.set
: TRUE if comprehension is a set
.delete_flag
: used to delete items
new()
constructor
Comprehension$new(generators, body, set)
generators
: generators of the expression
body
: body/expression of the comprehension
set
: bool to specify if comprehension is a set.
ngens()
get the number of generators
Comprehension$ngens()
getGens()
get all the generator expressions
Comprehension$getGens()
setGens()
set all the generator expressions
Comprehension$setGens(generators)
generators
: list of generator expressions to be set
getGen()
get the ith generator expression
Comprehension$getGen(i)
i
: index
setGen()
set the ith generator expression
Comprehension$setGen(i, expGen)
i
: index
expGen
: generator expression to be set
getBody()
get the expression/body
Comprehension$getBody()
setBody()
set the expression/body
Comprehension$setBody(e)
e
: new expression value
isSet()
check if comprehension is a set
Comprehension$isSet()
c_str()
get the MiniZinc representation
Comprehension$c_str()
getDeleteFlag()
delete flag for internal use
Comprehension$getDeleteFlag()
delete()
delete the assignment item
Comprehension$delete()
clone()
The objects of this class are cloneable with this method.
Comprehension$clone(deep = FALSE)
deep
: Whether to make a deep clone.
Useful links