Learn R Programming

houba (version 0.1.0)

Arithmetic: Arithmetic Operators

Description

Arithmetic operators for memory mapped objects

Usage

# S4 method for mmatrixOrMarray,mvectorOrNumeric
+(e1, e2)

# S4 method for mvectorOrNumeric,mmatrixOrMarray +(e1, e2)

# S4 method for mmatrixOrMarray,array +(e1, e2)

# S4 method for array,mmatrixOrMarray +(e1, e2)

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

# S4 method for mmatrixOrMarray,mvectorOrNumeric -(e1, e2)

# S4 method for mvectorOrNumeric,mmatrix -(e1, e2)

# S4 method for mvectorOrNumeric,marray -(e1, e2)

# S4 method for mmatrixOrMarray,array -(e1, e2)

# S4 method for matrix,mmatrix -(e1, e2)

# S4 method for array,marray -(e1, e2)

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

# S4 method for mmatrixOrMarray,missing -(e1, e2)

# S4 method for mmatrixOrMarray,mvectorOrNumeric *(e1, e2)

# S4 method for mvectorOrNumeric,mmatrixOrMarray *(e1, e2)

# S4 method for mmatrixOrMarray,array *(e1, e2)

# S4 method for array,mmatrixOrMarray *(e1, e2)

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

# S4 method for mmatrixOrMarray,mvectorOrNumeric /(e1, e2)

# S4 method for mvectorOrNumeric,mmatrix /(e1, e2)

# S4 method for mvectorOrNumeric,marray /(e1, e2)

# S4 method for mmatrixOrMarray,array /(e1, e2)

# S4 method for matrix,mmatrix /(e1, e2)

# S4 method for array,marray /(e1, e2)

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

# S4 method for mvector,mvectorOrNumeric +(e1, e2)

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

# S4 method for mvector,mvectorOrNumeric -(e1, e2)

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

# S4 method for mvector,missing -(e1, e2)

# S4 method for mvector,mvectorOrNumeric *(e1, e2)

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

# S4 method for mvector,mvectorOrNumeric /(e1, e2)

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

Value

an object of class mvector, mmatrix or marray depending on the operand classes.

Arguments

e1

first operand

e2

second operand

Details

The usual operations are performed. Values are recycled if necessary. There's no type promotion: if one of the operands is a R object and the other is a memory-mapped object, the result will be a memory mapped object with same data type as the operand. If both operand are memory mapped objects with different data types, the result will be a memory mapped object with the same data type than the left operand.

See Also

inplace

Examples

Run this code
x <- as.mvector(2**(1:4))
y <- 2*x
x <- x/2
x + c(1,2) / y

Run the code above in your browser using DataLab