This is native-only version of neilslater's Convolver Gem

FFTW3 dependency is removed, so calculations would be slow on big matrices. Use it only if you need to make a convolution with a small kernel.

All the credits to the author

Installing the gem

Add this line to your application's Gemfile:

gem 'convolver-light'

And then execute:

$ bundle

Or install it yourself as:

$ gem install convolver-light


require 'convolver-light

Usage is exactly the same as of original gem, please refer to the author's page

a = NArray[0.3,0.4,0.5]
b = NArray[1.3, -0.5]
c = Convolver.convolve( a, b )
=> NArray.float(2): [ 0.19, 0.27 ]