Skip to content
/ bart Public

Commit c139a99

Browse files
committed
style
1 parent 08ab54a commit c139a99

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/misc/pd.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static bool distance_check(int D, int T, int N, float vard, const float delta[T]
6262
}
6363

6464

65-
int (poissondisc_mc)(int D, int T, int N, int I, float vardens, const float delta[T][T], float points[N][D], int kind[N])
65+
int poissondisc_mc(int D, int T, int N, int I, float vardens, const float delta[T][T], float points[N][D], int kind[N])
6666
{
6767
PTR_ALLOC(char[N], active);
6868

@@ -162,7 +162,6 @@ int (poissondisc_mc)(int D, int T, int N, int I, float vardens, const float delt
162162
// create a random point between one and two times the allowed distance
163163

164164
do {
165-
166165
kind[p] = rr++ % T;
167166
dd = delta[kind[s2]][kind[p]];
168167

@@ -276,7 +275,7 @@ extern int poissondisc(int D, int N, int I, float vardens, float delta, float po
276275

277276

278277

279-
static void compute_rmatrix(int D, int T, float rmatrix[T][T], const float delta[T], int C, const int nc[T], const int mc[T][T])
278+
static void compute_rmatrix(int D, int T, float rmatrix[T][T], const float delta[T], int C, const int nc[T], const int mc[C][T])
280279
{
281280
unsigned long processed = 0;
282281
float density = 0.;
@@ -291,9 +290,7 @@ static void compute_rmatrix(int D, int T, float rmatrix[T][T], const float delta
291290
int ind = mc[k][i];
292291
processed = MD_SET(processed, ind);
293292
density += 1. / powf(delta[ind], (float)D);
294-
// printf("%d (%f)\t", ind, density);
295293
}
296-
//printf("\n");
297294

298295
for (int i = 0; i < nc[k]; i++)
299296
for (int j = 0; j < T; j++)
@@ -312,7 +309,7 @@ static int sort_cmp(const void* _a, const void* _b)
312309
{
313310
const struct sort_label* a = _a;
314311
const struct sort_label* b = _b;
315-
return ((a->x < b->x) - (a->x > b->x)); // FIXME
312+
return ((a->x < b->x) - (a->x > b->x));
316313
}
317314

318315
extern void mc_poisson_rmatrix(int D, int T, float rmatrix[T][T], const float delta[T])
@@ -345,8 +342,7 @@ extern void mc_poisson_rmatrix(int D, int T, float rmatrix[T][T], const float de
345342
nc[i] = j;
346343
}
347344

348-
compute_rmatrix(D, T, rmatrix, delta, i, nc, (const int (*)[T])mc);
345+
compute_rmatrix(D, T, rmatrix, delta, i, nc, mc);
349346
}
350347

351348

352-

0 commit comments

Comments
 (0)