// A cellset_t is a list of cells. (without duplicates) // // This is a very thin wrapper over an array of cells. // // You're encouraged to use the underlying representation directly by accessing // the cells field. #ifndef CELLSET_H #define CELLSET_H #include "shared.h" #include typedef struct { uint8_t count; uint8_t cells[N_CELLS]; } cellset_t; // Create an empty cellset_t. void cellset_init(cellset_t* cells); // Add a cell to the cellset_t. void cellset_add( cellset_t* row, uint8_t cell ); // Add a cell to the cellset_t, unless the new value equals exclude, in which // case nothing is done. // // (This operation is specifically useful in building the interference map. // See interference.h.) void cellset_add_exclude( cellset_t* row, uint8_t exclude, uint8_t cell ); #endif