convolve2 {strider}R Documentation

Convolve Matrices

Description

Demonstration of fast matrix convolution C++

Usage

convolve2(a, b)

Arguments

a

a numeric matrix

b

a numeric matrix

Details

A very efficient matric convolution implementation that demonstrates the use of the strided pointer and strided range concepts. Performance will be improved if the smaller matrix is given as the second argument.

See Also

convolve

Examples

a = matrix(c(1, 2, 1,
             1, 1, 1), 2, 3, byrow = TRUE)
b = matrix(c(0, 0, 0,
             0, 0, 0,
             0, 1, 0,
             0, 0, 0), 4, 3, byrow = TRUE)
convolve2(a, b)


[Package strider version 1.3 Index]