Rename allocations to assignments

This commit is contained in:
2024-04-08 18:45:40 +01:00
parent 05b6c54895
commit c6d01fd8ca
2 changed files with 21 additions and 19 deletions

View File

@@ -19,20 +19,22 @@ struct constraint {
} object;
};
struct allocation {
struct assignment {
int person;
int job;
int slot;
};
struct slot_result {
struct allocation allocations[MAX_JOBS];
struct assignment assignments[MAX_JOBS];
};
void generate_rota(struct slot_result *rota_out);
void generate_allocation(int slot, int job, struct allocation *allocation_out);
bool satisfies_allocation_constraints(const struct allocation *allocation);
bool previously_allocated(int previous_allocations[MAX_JOBS], int person);
void generate_assignment(int slot, int job, struct assignment *assignment_out);
bool satisfies_assignment_constraints(const struct assignment *assignment);
bool previously_allocated(int previous_assignments[MAX_JOBS], int person);
bool satisfies_slot_constraints(const struct slot_result *slot);
void print_rota(const struct slot_result *rota);