add for hw4

This commit is contained in:
2025-11-09 17:36:29 +09:00
parent 2cd6c98104
commit 49355f8f54
8 changed files with 1117 additions and 0 deletions

17
hws/hw4/rngutil.h Normal file
View File

@@ -0,0 +1,17 @@
#include <math.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct Interval {
size_t n_interval;
size_t *indexed;
} Interval;
Interval *new_interval(size_t n_int);
void free_interval(Interval *x);
void intervalizing(Interval *interval, size_t n, float *samples);
void print_histogram(Interval *interval, size_t n, float* samples);