Skip to content

Commit

Permalink
Fix multiple def error.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinffernandez committed Oct 26, 2022
1 parent ebe4bb7 commit 96656c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 4 additions & 0 deletions src/engine/common/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
#include <gsl/gsl_randist.h>
#include <time.h>

const gsl_rng_type *_random_generator;

gsl_rng *_rseed;

void shuffle(int *a, int size) { gsl_ran_shuffle(_rseed, a, size, sizeof(int)); }

unsigned long getRandomValue(int n)
Expand Down
10 changes: 1 addition & 9 deletions src/engine/common/random.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,10 @@
******************************************************************************/

#ifndef RANDOM_H_
#define RANDOM_H_
#pragma once

#include <gsl/gsl_rng.h>


const gsl_rng_type *_random_generator;

gsl_rng *_rseed;

unsigned long getRandomValue(int n);

double exponential(double mu);
Expand All @@ -42,5 +36,3 @@ void shuffle(int *a, int size);
void Random(unsigned long seed);

void freeRandom();

#endif /* RANDOM_H_ */

0 comments on commit 96656c2

Please sign in to comment.