UnOp {rminizinc}R Documentation

UnOp

Description

Unary operation expression in MiniZinc Possible unary operators are: "+", "-", "not"

Super class

rminizinc::Expression -> UnOp

Public fields

.args

list of expression arguments

.op

operator to be used

.delete_flag

used to delete items

Active bindings

.args

list of expression arguments

.op

operator to be used

.delete_flag

used to delete items

Methods

Public methods

Inherited methods

Method new()

constructor

Usage
UnOp$new(args, op)
Arguments
args

list of expressions

op

unary operator


Method nargs()

get the number of arguments

Usage
UnOp$nargs()

Method getArgs()

get all expression arguments

Usage
UnOp$getArgs()

Method setArgs()

set all expression arguments

Usage
UnOp$setArgs()
Arguments
args

argument list to be set


Method getArg()

get the ith expression argument

Usage
UnOp$getArg(i)
Arguments
i

index


Method setArg()

set the ith expression argument

Usage
UnOp$setArg(i, val)
Arguments
i

index

val

value of expression to be set


Method getOp()

get the unary operator

Usage
UnOp$getOp()

Method setOp()

set the unary operator

Usage
UnOp$setOp(unop)
Arguments
unop

unary operator to be set


Method c_str()

return the MiniZinc representation

Usage
UnOp$c_str()

Method getDeleteFlag()

delete flag for internal use

Usage
UnOp$getDeleteFlag()

Method delete()

delete the assignment item

Usage
UnOp$delete()

Method clone()

The objects of this class are cloneable with this method.

Usage
UnOp$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

newUnOp = UnOp$new(args = list(Int$new(5)), op = "-")
newUnOp$c_str()
newUnOp$setArg(1, Int$new(6))
newUnOp$setOp("+")
newUnOp$c_str()

[Package rminizinc version 0.0.8 Index]