#include <iostream>
#include <cmath>
template <typename T>
};
template <typename T>
struct setVal
private:
T _val;
};
template <typename T>
};
template <typename T1, typename T2>
T1
operator()(T1 lhs, T2 rhs)
const {
return lhs / rhs; }
};
template <typename T>
Gaussian(
float a,
float xc,
float yc,
float alpha) : _a(
a), _xc(xc), _yc(yc), _alpha(alpha) {}
float const dx =
x - _xc;
float const dy =
y - _yc;
return val + _a * ::exp(-(dx * dx + dy * dy) / (2 * _alpha * _alpha));
}
private:
float _a, _xc, _yc, _alpha;
};
cout << img1(0, 0) <<
" " << img2(0, 0) <<
endl;
cout << img1(0, 0) <<
" " << img2(0, 0) <<
endl;
cout << img1(0, 0) <<
" " << img2(0, 0) <<
endl;
cout << img1(0, 0) <<
" " << img2(0, 0) <<
endl;
float const peak = 1000.0;
float const xc = 5.0;
float const yc = 3.0;
float const alpha = 1.5;
cout << img1(0, 0) <<
" " << img1(xc, yc) <<
endl;
}