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

Description Usage Format Fields Methods Examples

Description

The multiplication of two terms, as an ASTNode.

Usage

1

Format

R6Class object.

Fields

left

The AST tree to the left.

right

The AST tree to the right.

Methods

new(left, right)

Create addition node of given left and right node.

terms()

Returns the node as a term vector

factors()

Returns all terminal nodes under this as a list

distribute()

Applies the distributive property to the node, and returns the resulting node. This is the actual workhorse of the disributing multiplication across the tree.

string()

Returns the string formula of the node

reduce(data)

Given a set of data, perform the logical reduction of the current node.

Examples

1

tangram documentation built on June 5, 2018, 1:04 a.m.