STEINGEN/include/random_groups.h

19 lines
497 B
C
Raw Permalink Normal View History

2024-12-24 16:23:07 +01:00
#ifndef RANDOM_GROUPS_H
#define RANDOM_GROUPS_H
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
2024-12-24 16:23:07 +01:00
// Struct for representing groups
typedef struct {
uint32_t *group; // Pointer to an array of group members
uint32_t size; // Number of members in the group
2024-12-24 16:23:07 +01:00
} Group;
// Function to generate random groups
void shuffle(uint32_t *array, uint32_t size, uint16_t* seed);
void generate_random_groups(uint32_t n, uint16_t k, Group *groups, uint16_t* seed);
2024-12-24 16:23:07 +01:00
#endif // RANDOM_GROUPS_H