/** \internal *\briefAclassforrefinable,backtrackableorderedpartitions. * *Thisisratheradatastructurewithsomehelperfunctionsthan *aproperself-containedclass. *Thatis,forefficiencyreasonsthefieldsofthisclassaredirectly *manipulatedfrombliss::AbstractGraphanditssubclasses. *Conversely,somemethodsofthisclassmodifythefieldsof *bliss::AbstractGraph,too.
*/ class Partition
{ public: /** *\briefDatastructureforholdinginformationaboutacellinaPartition.
*/ class Cell
{ friendclass Partition; public: unsignedint length; /* Index of the first element of the cell in
the Partition::elements array */ unsignedint first; unsignedint max_ival; unsignedint max_ival_count; private: bool in_splitting_queue; public: bool in_neighbour_heap; /* Pointer to the next cell, null if this is the last one. */
Cell* next;
Cell* prev;
Cell* next_nonsingleton;
Cell* prev_nonsingleton; unsignedint split_level; /** Is this a unit cell? */ bool is_unit() const {return(length == 1); } /** Is this cell in splitting queue? */ bool is_in_splitting_queue() const {return(in_splitting_queue); }
};
private:
/** \internal *Datastructureforrememberinginformationaboutsplitsinorderto *performefficientbacktrackingoverthesplits.
*/ class RefInfo { public: unsignedint split_cell_first; int prev_nonsingleton_first; int next_nonsingleton_first;
}; /** \internal *Astackforrememberingthesplits,usedforbacktracking.
*/
KStack<RefInfo> refinement_stack;
class BacktrackInfo { public: unsignedint refinement_stack_size; unsignedint cr_backtrack_point;
};
typedef std::vector<unsignedint>::iterator uint_pointer_substitute; typedef std::vector<unsignedint>::const_iterator
uint_pointer_to_const_substitute;
std::vector<unsignedint> elements_vec;
uint_pointer_substitute elements; /* invariant_values[e] gives the invariant value of the element e */
std::vector<unsignedint> invariant_values_vec;
uint_pointer_substitute invariant_values; /* element_to_cell_map[e] gives the cell of the element e */
std::vector<Cell*> element_to_cell_map_vec;
cell_pointer_pointer_substitute element_to_cell_map; /** Get the cell of the element \a e */
Cell* get_cell(constunsignedint e) const { return element_to_cell_map_vec[e];
} /* in_pos[e] points to the elements array s.t. *in_pos[e] = e */
std::vector<uint_pointer_substitute> in_pos_vec;
std::vector<uint_pointer_substitute>::iterator in_pos;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.