Arithmetic operators for memory mapped objects
# 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)
an object of class mvector, mmatrix or marray depending on the operand classes.
first operand
second operand
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.
inplace
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