30 const double INF = 1E20;
33 static float *
dt(
float *f,
int n) {
34 float *
d =
new float[n];
36 float *
z =
new float[n+1];
41 for (
int q = 1; q <= n-1; q++) {
42 float s = ((f[q]+
square(q))-(f[v[k]]+
square(v[k])))/(2*q-2*v[k]);
45 s = ((f[q]+
square(q))-(f[v[k]]+
square(v[k])))/(2*q-2*v[k]);
54 for (
int q = 0; q <= n-1; q++) {
57 d[q] =
square(q-v[k]) + f[v[k]];
67 int width = im->
width();
69 float *
f =
new float[std::max(width,height)];
72 for (
int x = 0;
x < width;
x++) {
73 for (
int y = 0;
y < height;
y++) {
76 float *
d =
dt(f, height);
77 for (
int y = 0;
y < height;
y++) {
84 for (
int y = 0;
y < height;
y++) {
85 for (
int x = 0;
x < width;
x++) {
88 float *
d =
dt(f, width);
89 for (
int x = 0;
x < width;
x++) {
100 int width = im->
width();
101 int height = im->
height();
104 for (
int y = 0;
y < height;
y++) {
105 for (
int x = 0;
x < width;
x++) {
TFSIMD_FORCE_INLINE const tfScalar & y() const
TFSIMD_FORCE_INLINE const tfScalar & x() const
TFSIMD_FORCE_INLINE const tfScalar & z() const