ArrayAccess: Array Access

Description Super class Public fields Active bindings Methods Examples

Description

Create ArrayAccess elements in MiniZinc

Super class

rminizinc::Expression -> ArrayAccess

Public fields

.v

the id/value of array

.args

arguments of the array

.delete_flag

used to delete items

Active bindings

.v

the id/value of array

.args

arguments of the array

.delete_flag

used to delete items

Methods

Public methods

Inherited methods

Method new()

constructor

Usage
ArrayAccess$new(v, args)
Arguments
v

the value/identifier of variable decl

args

the array indices


Method getV()

get the array access value

Usage
ArrayAccess$getV()

Method setV()

set the array access value

Usage
ArrayAccess$setV(val)
Arguments
val

new array access value


Method nargs()

get the number of arguments

Usage
ArrayAccess$nargs()

Method getArgs()

get the arguments

Usage
ArrayAccess$getArgs()

Method setArgs()

set the arguments

Usage
ArrayAccess$setArgs(val)
Arguments
val

new arguments


Method c_str()

return the MiniZinc representation

Usage
ArrayAccess$c_str()

Method getDeleteFlag()

delete flag for internal use

Usage
ArrayAccess$getDeleteFlag()

Method delete()

delete the assignment item

Usage
ArrayAccess$delete()

Method clone()

The objects of this class are cloneable with this method.

Usage
ArrayAccess$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

1
2
3
4
5
vDecl1 = IntSetDecl(name = "SET", kind = "par")
vDecl2 = IntArrDecl(name = "profit", kind = "par", ndim = 1, 
ind = list(vDecl1$getId()))
newArrayAccess = ArrayAccess$new(v = vDecl2$getId(),
 args = list(IntDecl(name = "i", kind = "par")))

rminizinc documentation built on Oct. 15, 2021, 9:06 a.m.