Apogeum12 / convolution-two-vectors

Simple Convolution algorithm in c++ for two vectors.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Algorithm Convolution two vectors

Simple algorithm in c++ for calculating Convolution two vectors u and v.

About code

I writed algorithm code on Windows, so on linux or mac may be others compile ways. But I created CMakeLists.txt file and I think that is very similar compiling proces.

Prerequisites

On Windows you must install Cmake and MinGW application before compile algorithm.

How compile the algorithm

  • Open Cmd terminal As Admin in folder with code.
    • Example:
$ cd C:\CMake\Conv
  • Next:
$ cmake -G "MinGW Makefiles" .

test1

  • After finish build in cmd:
$ make -j

test2

Running the tests

  • Open program in bin folder.
$ cd bin
$ Conv
  • Test for length u = 2 and v = 4
$ 2 4
$ 1 1
$ 1 0 1 1
$ -> 1 1 1 2 1
  • Test for length u = 4 and v = 4
$ 4 4
$ 0.11 0.008 154 6
$ 0.0099 0.1 6 10
$ -> 0.001089 0.0110792 2.1854 16.6074 924.68 1576 60

test3

About

Simple Convolution algorithm in c++ for two vectors.

License:MIT License


Languages

Language:C++ 84.1%Language:CMake 15.9%