diff options
| author | leochanj105 <leochanj@live.unc.edu> | 2021-10-26 13:22:32 -0400 |
|---|---|---|
| committer | leochanj105 <leochanj@live.unc.edu> | 2021-10-26 13:22:32 -0400 |
| commit | 14c854543b1a3cf344a371a5b45595657f95786b (patch) | |
| tree | 70f752880522e5e44669af365754ac0f649dce81 /SD-VBS/benchmarks/localization/src/c/get3DGaussianProb.c | |
| parent | 5e2ccfae0532ddd89bcc04bf14aad451e9c79785 (diff) | |
add deadlines and costs
Diffstat (limited to 'SD-VBS/benchmarks/localization/src/c/get3DGaussianProb.c')
| -rw-r--r-- | SD-VBS/benchmarks/localization/src/c/get3DGaussianProb.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/SD-VBS/benchmarks/localization/src/c/get3DGaussianProb.c b/SD-VBS/benchmarks/localization/src/c/get3DGaussianProb.c deleted file mode 100644 index 58c4475..0000000 --- a/SD-VBS/benchmarks/localization/src/c/get3DGaussianProb.c +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | /******************************** | ||
| 2 | Author: Sravanthi Kota Venkata | ||
| 3 | ********************************/ | ||
| 4 | |||
| 5 | #include <stdio.h> | ||
| 6 | #include <stdlib.h> | ||
| 7 | #include "localization.h" | ||
| 8 | |||
| 9 | F2D* get3DGaussianProb( F2D* data, F2D* mean, F2D* A) | ||
| 10 | { | ||
| 11 | F2D *p, *diff, *temp1, *temp2, *mt; | ||
| 12 | float temp; | ||
| 13 | int n_data, n_channel; | ||
| 14 | int i, j, k; | ||
| 15 | F2D* t; | ||
| 16 | float pi = 3.1412; | ||
| 17 | |||
| 18 | n_data = data->height; | ||
| 19 | n_channel = data->width; | ||
| 20 | |||
| 21 | t = fSetArray(n_data, 1, 1); | ||
| 22 | |||
| 23 | mt = fMtimes(t, mean); | ||
| 24 | diff = fMinus( data, mt); | ||
| 25 | p = fSetArray(diff->height, 1, 0); | ||
| 26 | |||
| 27 | temp = sqrt(1.0/(pow(2*pi, n_channel))); | ||
| 28 | temp2 = randWrapper(diff->height,1); | ||
| 29 | |||
| 30 | j = (temp2->height*temp2->width); | ||
| 31 | for(i=0; i<j; i++) | ||
| 32 | { | ||
| 33 | float temp2i; | ||
| 34 | temp2i = asubsref(temp2,i); | ||
| 35 | |||
| 36 | temp2i = exp(-0.5*temp2i); | ||
| 37 | asubsref(p,i) = temp2i*temp; | ||
| 38 | } | ||
| 39 | |||
| 40 | fFreeHandle(t); | ||
| 41 | fFreeHandle(temp2); | ||
| 42 | fFreeHandle(mt); | ||
| 43 | fFreeHandle(diff); | ||
| 44 | |||
| 45 | return p; | ||
| 46 | } | ||
| 47 | |||
| 48 | |||
| 49 | |||
