29 #include "abstractgraph.hh" 58 unsigned int max_ival;
59 unsigned int max_ival_count;
61 bool in_splitting_queue;
63 bool in_neighbour_heap;
67 Cell* next_nonsingleton;
68 Cell* prev_nonsingleton;
69 unsigned int split_level;
71 bool is_unit()
const {
return(length == 1); }
85 unsigned int split_cell_first;
86 int prev_nonsingleton_first;
87 int next_nonsingleton_first;
92 std::vector<RefInfo> refinement_stack;
96 unsigned int refinement_stack_size;
97 unsigned int cr_backtrack_point;
103 std::vector<BacktrackInfo> bt_stack;
110 void splitting_queue_add(
Cell*
const cell);
111 Cell* splitting_queue_pop();
112 bool splitting_queue_is_empty()
const;
113 void splitting_queue_clear();
138 const unsigned int element);
140 Cell* aux_split_in_two(
Cell*
const cell,
141 const unsigned int first_half_size);
148 unsigned int discrete_cell_count;
151 Cell* first_nonsingleton_cell;
152 unsigned int *elements;
154 unsigned int *invariant_values;
156 Cell **element_to_cell_map;
160 return element_to_cell_map[e];
163 unsigned int **in_pos;
172 void init(
const unsigned int N);
180 unsigned int nof_discrete_cells()
const {
return(discrete_cell_count); }
185 size_t print(FILE*
const fp,
const bool add_newline =
true)
const;
190 size_t print_signature(FILE*
const fp,
const bool add_newline =
true)
const;
204 Cell *zplit_cell(
Cell *
const cell,
const bool max_ival_info_ok);
211 unsigned int cr_get_level(
const unsigned int cell_index)
const;
212 unsigned int cr_split_level(
const unsigned int level,
213 const std::vector<unsigned int>& cells);
230 CRCell** prev_next_ptr;
233 next->prev_next_ptr = prev_next_ptr;
234 *(prev_next_ptr) = next;
237 prev_next_ptr =
nullptr;
244 unsigned int created_trail_index;
245 unsigned int splitted_level_trail_index;
247 std::vector<unsigned int> cr_created_trail;
248 std::vector<unsigned int> cr_splitted_level_trail;
249 std::vector<CR_BTInfo> cr_bt_info;
250 unsigned int cr_max_level;
251 void cr_create_at_level(
const unsigned int cell_index,
unsigned int level);
252 void cr_create_at_level_trailed(
const unsigned int cell_index,
unsigned int level);
253 unsigned int cr_get_backtrack_point();
254 void cr_goto_backtrack_point(
const unsigned int btpoint);
262 Cell* sort_and_split_cell1(
Cell* cell);
263 Cell* sort_and_split_cell255(
Cell*
const cell,
const unsigned int max_ival);
264 bool shellsort_cell(
Cell* cell);
273 unsigned int dcs_count[256];
274 unsigned int dcs_start[256];
275 void dcs_cumulate_count(
const unsigned int max);
280 Partition::splitting_queue_pop()
282 assert(!splitting_queue.is_empty());
283 Cell*
const cell = splitting_queue.pop_front();
284 assert(cell->in_splitting_queue);
285 cell->in_splitting_queue =
false;
290 Partition::splitting_queue_is_empty()
const 292 return splitting_queue.is_empty();
297 Partition::cr_get_level(
const unsigned int cell_index)
const 300 assert(cell_index < N);
301 assert(cr_cells[cell_index].level != UINT_MAX);
302 return(cr_cells[cell_index].level);
Definition: abstractgraph.cc:35
A simple implementation of queues with fixed maximum capacity.
Definition: kqueue.hh:31
Cell * individualize(Cell *const cell, const unsigned int element)
Definition: partition.cc:254
size_t print(FILE *const fp, const bool add_newline=true) const
Definition: partition.cc:353
BacktrackPoint set_backtrack_point()
Definition: partition.cc:147
void clear_ivs(Cell *const cell)
Definition: partition.cc:822
size_t print_signature(FILE *const fp, const bool add_newline=true) const
Definition: partition.cc:379
bool is_unit() const
Definition: partition.hh:71
unsigned int BacktrackPoint
Definition: partition.hh:117
Data structure for holding information about a cell in a Partition.
Definition: partition.hh:50
bool is_in_splitting_queue() const
Definition: partition.hh:73
bool is_discrete() const
Definition: partition.hh:178
void init(const unsigned int N)
Definition: partition.cc:64
An abstract base class for different types of graphs.
Definition: abstractgraph.hh:47
Cell * get_cell(const unsigned int e) const
Definition: partition.hh:158
A class for refinable, backtrackable ordered partitions.
Definition: partition.hh:44
void goto_backtrack_point(BacktrackPoint p)
Definition: partition.cc:161