Skip to content

Instantly share code, notes, and snippets.

View agrafix's full-sized avatar
🛰️
Haskell

Alexander Thiemann agrafix

🛰️
Haskell
View GitHub Profile
@agrafix
agrafix / GaussSmoothen.h
Created June 15, 2016 15:50
Gaussian smoothening of 1D signal in C++
#pragma once
#include <cmath>
#include <vector>
#include <assert.h>
inline double gauss(double sigma, double x) {
double expVal = -1 * (pow(x, 2) / pow(2 * sigma, 2));
double divider = sqrt(2 * M_PI * pow(sigma, 2));
return (1 / divider) * exp(expVal);