2024-12-24 16:23:07 +01:00
|
|
|
#ifndef RANDOM_GROUPS_H
|
|
|
|
#define RANDOM_GROUPS_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
2024-12-31 11:10:33 +01:00
|
|
|
#include <stdint.h>
|
2024-12-24 16:23:07 +01:00
|
|
|
|
|
|
|
// Struct for representing groups
|
|
|
|
typedef struct {
|
2024-12-31 11:10:33 +01:00
|
|
|
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
|
2024-12-31 11:10:33 +01:00
|
|
|
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
|