ASTMultiply: The multiplication of two terms, as an ASTNode.

ASTMultiplyR Documentation

The multiplication of two terms, as an ASTNode.

Description

The multiplication of two terms, as an ASTNode.

The multiplication of two terms, as an ASTNode.

Format

R6Class object.

Super classes

tangram::ASTNode -> tangram::ASTBranch -> ASTMultiply

Public fields

left

The AST tree to the left.

right

The AST tree to the right.

type

The specified type of this node

Methods

Public methods

Inherited methods

Method new()

Construct a multiplication node

Usage
ASTMultiply$new(left, right)
Arguments
left

(ASTNode) nodes to the left of the multiplication

right

(ASTNode) nodes to the right of the multiplication


Method distribute()

Rearrange nodes distribution multiplication across parenthesis

Usage
ASTMultiply$distribute()

Method factors()

return all terminal nodes on left and right

Usage
ASTMultiply$factors()

Method string()

Return a re-parseable string

Usage
ASTMultiply$string()

Method clone()

The objects of this class are cloneable with this method.

Usage
ASTMultiply$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

ASTMultiply$new(ASTVariable$new("x"), ASTVariable$new("y"))$string()


spgarbet/tg documentation built on Feb. 21, 2023, 3:35 a.m.