scidb.expression.binary: Binary expression class

scidb.expression.binaryR Documentation

Binary expression class

Description

Class representing a binary operation in an expression

Super class

scidb::scidb.expression -> scidb.expression.binary

Methods

Public methods


Method new()

Usage
scidb.expression.binary$new(op, left, right)
Arguments
op

compound type ("&&", "||", or "!")

left

left predicate (for all op cases)

right

right predicate (for "&&" or "||")


Method type()

Returns the type of the expression as a string

Usage
scidb.expression.binary$type()
Returns

"BINARY"


Method operation()

Returns the binary operation name

Usage
scidb.expression.binary$operation()
Returns

binary op name (length-1 character)


Method left()

Usage
scidb.expression.binary$left()
Returns

if type "&&", "||", or "!", left predicate; else NULL


Method right()

Usage
scidb.expression.binary$right()
Returns

if type "&&" or "||", right predicate; else NULL


Method symbols()

Returns the distinct symbols used in the expression

Usage
scidb.expression.binary$symbols()
Returns

vector of symbol names


Method unary()

Whether or not the expression is a function of (at most) a single symbol

Usage
scidb.expression.binary$unary()
Returns

a boolean value indicating unary or non-unary


Method unary_composite()

Whether or not the expression is unary or a boolean AND or OR of two other in-turn unary composite expressions

Usage
scidb.expression.binary$unary_composite()
Returns

a boolean value indicating unary-composite or not


Method substitute()

Renames the symbols in the expression according to replacements in the arguments

Usage
scidb.expression.binary$substitute(...)
Arguments
...

optional list of string replacements for each symbol in the expression


Method to_r()

Convert the expression to an R string, with optional symbol substitutions

Usage
scidb.expression.binary$to_r(...)
Arguments
...

optional list of string replacements for each symbol in the expression

Returns

evaluation of this predicate as a single R string


Method to_afl()

Convert the expression to an AFL string, with optional symbol substitutions

Usage
scidb.expression.binary$to_afl(...)
Arguments
...

optional list of string replacements for each symbol in the expression

Returns

evaluation of this predicate as a single AFL string


Method clone()

The objects of this class are cloneable with this method.

Usage
scidb.expression.binary$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


Paradigm4/SciDBR documentation built on Nov. 9, 2023, 4:58 a.m.