Learn R Programming

rminizinc (version 0.0.8)

BinOp: BinOp

Description

Create a binary operation expression possible binary operators are: "+", "-", "!=", "<->", ">=", "<=", "*", ">", "<", "->", "<-", "..", "\/", "/\", "'not'", "subset", "superset", "union", "diff", "symdiff", "intersect", "^", "div", "mod", "/", "++", "xor", "in", "="

Arguments

Super class

rminizinc::Expression -> BinOp

Public fields

.lhs_exp

the left hand side expression

.rhs_exp

the right hand side expression

.op

the operator

.delete_flag

used to delete items

Active bindings

.lhs_exp

the left hand side expression

.rhs_exp

the right hand side expression

.op

the operator

.delete_flag

used to delete items

Methods

Public methods

Method new()

constructor

Usage

BinOp$new(lhs, binop, rhs)

Arguments

lhs

the left hand side expression

binop

the binary operator to be used

rhs

the right hand side expression

Method getLhs()

get the lhs expression

Usage

BinOp$getLhs()

Method getRhs()

get the rhs expression

Usage

BinOp$getRhs()

Method getOp()

get the operator

Usage

BinOp$getOp()

Method setOp()

set the operator

Usage

BinOp$setOp(binop)

Arguments

op

binary operator to be set

Method setLhs()

set the lhs expression

Usage

BinOp$setLhs(e)

Arguments

e

expression to set

Method setRhs()

set the rhs expression

Usage

BinOp$setRhs(e)

Arguments

e

expression to set

Method c_str()

return the MiniZinc representation

Usage

BinOp$c_str()

Method getDeleteFlag()

delete flag for internal use

Usage

BinOp$getDeleteFlag()

Method delete()

delete the assignment item

Usage

BinOp$delete()

Method clone()

The objects of this class are cloneable with this method.

Usage

BinOp$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
# NOT RUN {
newBinOp = BinOp$new(lhs = Int$new(2), binop = "+", rhs = Int$new(5))
newBinOp$c_str()
newBinOp$setLhs(Int$new(5))
newBinOp$setOp("-")
newBinOp$setRhs(Int$new(2))
newBinOp$c_str()
# }

Run the code above in your browser using DataLab