summaryrefslogtreecommitdiff
path: root/src/graph_genfunc.c
blob: d3962061cea99f0a52e3d6aec900a00a76fe1791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

#include "fracture.h"

double *genfunc_uniform(uint_t num, gsl_rng *r) {
	double *lattice = (double *)malloc(2 * num * sizeof(double));

	for (uint_t i = 0; i < 2 * num; i++) {
		lattice[i] = gsl_rng_uniform(r);
	}

	return lattice;
}

double *genfunc_hyperuniform(uint_t num, gsl_rng *r) {
	double *lattice = spheres(num, 0.8, 0.5, 0.9, 100, 100000);

	return lattice;
}