14#define TRACE_MARKER_INDIVIDUALIZE (INT32_MAX-7)
15#define TRACE_MARKER_REFINE_START (INT32_MAX-2)
16#define TRACE_MARKER_REFINE_END (INT32_MAX-3)
17#define TRACE_MARKER_REFINE_CELL_START (INT32_MAX-4)
18#define TRACE_MARKER_REFINE_CELL_END (INT32_MAX-5)
36 std::vector<int> data;
38 trace *compare_trace =
nullptr;
39 unsigned long hash = 0;
48 bool assert_cell_act =
false;
49 bool assert_refine_act =
false;
55 void inline add_to_hash(
int d) {
56 unsigned long ho = hash & 0xff00000000000000;
58 hash = hash ^ (ho >> 56);
62 void write_compare(
int d) {
63 d = std::min(INT32_MAX-10,d);
65 write_compare_no_limit(d);
66 dej_assert(record?
static_cast<int>(data.size())==position:
true);
69 void write_compare_no_limit(
int d) {
71 if (record) data.push_back(d);
72 if (compare) comp = comp && (position < ((int) compare_trace->data.size()))
73 && (compare_trace->data[position] == d);
97 write_compare(ind_color);
106 assert_refine_act =
true;
120 assert_cell_act =
true;
129 write_compare(new_color);
142 assert_cell_act =
false;
153 assert_refine_act =
false;
164 if (!compare || !comp || position >
static_cast<int>(compare_trace->data.size()))
return true;
167 size_t read_pt = position;
168 dej_assert(compare_trace->data.size() > read_pt);
173 dej_assert(compare_trace->data.size() > read_pt);
174 dej_assert((compare_trace->data[read_pt] ==
false) || (compare_trace->data[read_pt] ==
true));
175 return compare_trace->data[read_pt];
185 while (position <
static_cast<int>(compare_trace->data.size()) &&
187 dej_assert(compare_trace->data.size() > (
size_t) position);
191 assert_cell_act =
false;
198 assert_cell_act =
false;
199 assert_refine_act =
false;
201 int read_pt = std::max((
int) data.size() - 1, 0);
205 data.resize(read_pt);
209 int read_pt = std::max(position - 1, 0);
223 assert_cell_act =
false;
224 assert_refine_act =
false;
226 int read_pt = position - 1;
227 while ((
size_t) read_pt < compare_trace->data.size() &&
241 this->compare_trace = new_compare_trace;
251 this->compare = new_compare;
266 this->hash = new_hash;
291 compare_trace =
nullptr;
294 dej_assert(record?
static_cast<int>(data.size())==position:
true);
300 this->record = new_record;
309 assert_cell_act =
false;
310 assert_refine_act =
false;
311 this->position = new_position;
312 if(record) data.resize(position);
313 dej_assert(record?
static_cast<int>(data.size())==position:
true);
dej_nodiscard int get_position() const
dej_nodiscard unsigned long get_hash() const
void set_record(bool new_record)
void reset_trace_unequal()
void op_refine_cell_end()
void set_position(int new_position)
dej_nodiscard bool trace_equal() const
void set_hash(unsigned long new_hash)
void op_additional_info(int d)
void op_refine_cell_start(int)
void set_compare_trace(trace *new_compare_trace)
void op_individualize(const int ind_color)
void set_compare(bool new_compare)
void blueprint_skip_to_next_cell()
void op_refine_cell_record(int new_color)
dej_nodiscard bool blueprint_is_next_cell_active()
trace * get_compare_trace()
void skip_to_individualization()
void reserve(const int n)
void rewind_to_individualization()
#define TRACE_MARKER_REFINE_START
#define TRACE_MARKER_REFINE_CELL_END
#define TRACE_MARKER_REFINE_END
#define TRACE_MARKER_REFINE_CELL_START
#define TRACE_MARKER_INDIVIDUALIZE