ArrayAccess function

Array Access

Array Access

Create ArrayAccess elements in MiniZinc

Examples

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")))

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

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.

  • Maintainer: Akshit Achara
  • License: Mozilla Public License Version 2.0
  • Last published: 2021-10-15