Comprehension function

Comprehension

Comprehension

Create a Comprehension in MiniZinc

Super class

rminizinc::Expression -> Comprehension

Public fields

  • .generators: a vector of generators

  • .expression: the comprehension expression

  • .set: TRUE if comprehension is a set

  • .delete_flag: used to delete items

Active bindings

  • .generators: a vector of generators

  • .expression: the comprehension expression

  • .set: TRUE if comprehension is a set

  • .delete_flag: used to delete items

Methods

Public methods

Method new()

constructor

Usage

Comprehension$new(generators, body, set)

Arguments

  • generators: generators of the expression

  • body: body/expression of the comprehension

  • set: bool to specify if comprehension is a set.

Method ngens()

get the number of generators

Usage

Comprehension$ngens()

Method getGens()

get all the generator expressions

Usage

Comprehension$getGens()

Method setGens()

set all the generator expressions

Usage

Comprehension$setGens(generators)

Arguments

  • generators: list of generator expressions to be set

Method getGen()

get the ith generator expression

Usage

Comprehension$getGen(i)

Arguments

  • i: index

Method setGen()

set the ith generator expression

Usage

Comprehension$setGen(i, expGen)

Arguments

  • i: index

  • expGen: generator expression to be set

Method getBody()

get the expression/body

Usage

Comprehension$getBody()

Method setBody()

set the expression/body

Usage

Comprehension$setBody(e)

Arguments

  • e: new expression value

Method isSet()

check if comprehension is a set

Usage

Comprehension$isSet()

Method c_str()

get the MiniZinc representation

Usage

Comprehension$c_str()

Method getDeleteFlag()

delete flag for internal use

Usage

Comprehension$getDeleteFlag()

Method delete()

delete the assignment item

Usage

Comprehension$delete()

Method clone()

The objects of this class are cloneable with this method.

Usage

Comprehension$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