Learn R Programming

houba (version 0.1.0)

inplace: In-place arithmetic operations

Description

In-place arithmetic operations

Usage

inplace.inverse(x)

inplace.opposite(x)

inplace.sum(x, y)

# S4 method for memoryMapped,numeric inplace.sum(x, y)

# S4 method for memoryMapped,memoryMapped inplace.sum(x, y)

inplace.minus(x, y)

# S4 method for memoryMapped,numeric inplace.minus(x, y)

# S4 method for memoryMapped,memoryMapped inplace.minus(x, y)

inplace.prod(x, y)

# S4 method for memoryMapped,numeric inplace.prod(x, y)

# S4 method for memoryMapped,memoryMapped inplace.prod(x, y)

inplace.div(x, y)

# S4 method for memoryMapped,numeric inplace.div(x, y)

# S4 method for memoryMapped,memoryMapped inplace.div(x, y)

Value

None

Arguments

x

a memory mapped object

y

a R object or a memory mapped object

Details

These functions will modify x in-place, performing the operation indicated by their name.

Examples

Run this code
x <- as.mvector( 2**(1:3) )
inplace.inverse(x)
inplace.opposite(x)
inplace.sum(x, 0.5)
inplace.prod(x, 8)
x
y <- copy(x)
inplace.prod(x, y)
x

Run the code above in your browser using DataLab