Learn R Programming

rminizinc (version 0.0.8)

Set: Set

Description

Create a set in MiniZinc

Arguments

Super class

rminizinc::Expression -> Set

Public fields

.setVal

the value of the set

.isv

the integer range set

.fsv

the float range set

.et

empty set

.delete_flag

used to delete items

Active bindings

.setVal

the value of the set

.isv

the integer range set

.fsv

the float range set

.et

empty set

.delete_flag

used to delete items

Methods

Public methods

Method new()

constuctor

Usage

Set$new(val = NULL, empty_set = FALSE)

Arguments

val

the set value

empty_set

bool to specify is set is empty(FALSE by default)

Method getSetVec()

get the set expression

Usage

Set$getSetVec()

Method setSetVec()

set the set expression

Usage

Set$setSetVec(val)

Arguments

val

list of expressions

Method isEmpty()

is the set empty

Usage

Set$isEmpty()

Method makeEmpty()

make the set empty

Usage

Set$makeEmpty()

Method getIsv()

return the integer set range

Usage

Set$getIsv()

Method setIsv()

set the integer set range

Usage

Set$setIsv(val)

Arguments

val

integer set range

Method getFsv()

get the float set range

Usage

Set$getFsv()

Method setFsv()

set the float set range

Usage

Set$setFsv(val)

Arguments

val

float set range

Method c_str()

get the MiniZinc representation

Usage

Set$c_str()

Method getDeleteFlag()

delete flag for internal use

Usage

Set$getDeleteFlag()

Method delete()

delete the assignment item

Usage

Set$delete()

Method clone()

The objects of this class are cloneable with this method.

Usage

Set$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
# NOT RUN {
newIntSet = Set$new(val = IntSetVal$new(1,5))
newIntSet$c_str()
newIntSet$setIsv(IntSetVal$new(2,6))
newIntSet$c_str()
newFloatSet = Set$new(val = FloatSetVal$new(1.1,5.1))
newFloatSet$c_str()
newFloatSet$setFsv(FloatSetVal$new(1.2,4.1))
# }

Run the code above in your browser using DataLab