kazaam (version 0.1-0)

arithmetic: Arithmetic Operators

Description

Some binary arithmetic operations for shaqs. All operations are vector-shaq or shaq-vector, but not shaq-shaq. See details section for more information.

Usage

# S4 method for shaq,shaq
+(e1, e2)

# S4 method for shaq,numeric +(e1, e2)

# S4 method for numeric,shaq +(e1, e2)

# S4 method for shaq,shaq -(e1, e2)

# S4 method for shaq,numeric -(e1, e2)

# S4 method for numeric,shaq -(e1, e2)

# S4 method for shaq,shaq *(e1, e2)

# S4 method for shaq,numeric *(e1, e2)

# S4 method for numeric,shaq *(e1, e2)

# S4 method for shaq,shaq /(e1, e2)

# S4 method for shaq,numeric /(e1, e2)

# S4 method for numeric,shaq /(e1, e2)

Arguments

e1, e2

A shaq or a numeric vector.

Value

A shaq.

Communication

Each operation is completely local.

Details

For binary operations involving two shaqs, they must be distributed identically.

Examples

Run this code

library(kazaam)
x = ranshaq(runif, 10, 3)
y = ranshaq(runif, 10, 3)

x + y
x / 2
y + 1

finalize()


Run the code above in your browser using DataLab