mirror of
https://github.com/allemangD/toddcox-visualize.git
synced 2025-11-10 03:52:48 -05:00
Make Row struct smaller with bit fields.
This commit is contained in:
@@ -15,14 +15,12 @@ namespace tc {
|
|||||||
* Rows document the "loops" formed by
|
* Rows document the "loops" formed by
|
||||||
*/
|
*/
|
||||||
struct Row {
|
struct Row {
|
||||||
bool free = true;
|
bool free: 1;
|
||||||
bool idem = false;
|
bool idem: 1;
|
||||||
|
unsigned int gnr: 14; // progress through the loop
|
||||||
|
unsigned int lst_idx: 32; // the coset that would complete the loop
|
||||||
|
|
||||||
// the number of cosets identified so far
|
Row() : free(true), idem(false), gnr(0), lst_idx(0) {}
|
||||||
int gnr = 0;
|
|
||||||
|
|
||||||
// the index of the coset that would complete the loop
|
|
||||||
size_t lst_idx = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Tables {
|
struct Tables {
|
||||||
@@ -149,12 +147,6 @@ namespace tc {
|
|||||||
|
|
||||||
trow = crow;
|
trow = crow;
|
||||||
trow.gnr++;
|
trow.gnr++;
|
||||||
// trow.lst_idx = crow.lst_idx;
|
|
||||||
// trow.free = crow.free;
|
|
||||||
// trow.gnr = crow.gnr + 1;
|
|
||||||
|
|
||||||
// if (crow.gnr < 0)
|
|
||||||
// trow.gnr -= 2;
|
|
||||||
|
|
||||||
if (trow.idem) {
|
if (trow.idem) {
|
||||||
if (trow.gnr == rel.mult) {
|
if (trow.gnr == rel.mult) {
|
||||||
|
|||||||
Reference in New Issue
Block a user