Function Items
Create Independent functions (that are not part of any other items) in a MiniZinc model
rminizinc::Item
-> FunctionItem
.id
: name of the function
.e
: expression in the function
.decls
: parameter declarations
.ann
: annotation
.ti
: return type of the function
.delete_flag
: used to delete items
.id
: name of the function
.e
: expression in the function
.decls
: parameter declarations
.ann
: annotation
.ti
: return type of the function
.delete_flag
: used to delete items
new()
constructor
FunctionItem$new(
name = NULL,
decls = NULL,
rt = NULL,
ann = NULL,
body = NULL,
mzn_str = NULL
)
name
: name of the function
decls
: variable declarations
rt
: the return type ("bool par", "bool var" or other)
ann
: annotation
body
: body of the function
mzn_str
: string representation of Function Item
name()
get the name of the function
FunctionItem$name()
getDecls()
get the list of declarations
FunctionItem$getDecls()
getBody()
get the function body
FunctionItem$getBody()
getAnn()
get the function annotation
FunctionItem$getAnn()
setDecls()
set the list of declarations
FunctionItem$setDecls(decls)
decls
: list of declarations to be set
setBody()
set the function body
FunctionItem$setBody()
body
: function expression to set or NULL
setAnn()
set the function annotation
FunctionItem$setAnn()
ann
: annotation to be set or NULL
rtype()
get if the function is a test, predicate or a function call itself.
FunctionItem$rtype()
c_str()
get the MiniZinc representation
FunctionItem$c_str()
getDeleteFlag()
delete flag for internal use
FunctionItem$getDeleteFlag()
delete()
delete the variable item
FunctionItem$delete()
clone()
The objects of this class are cloneable with this method.
FunctionItem$clone(deep = FALSE)
deep
: Whether to make a deep clone.
Useful links