mirror of https://github.com/CGAL/cgal
Add reserve() in generic code and change comment to avoid warning
This commit is contained in:
parent
104aca6295
commit
2a5fcdcfb1
|
|
@ -65,16 +65,18 @@ class ID_support_handler<SNC_indexed_items, Decorator> {
|
|||
hash.reserve(n);
|
||||
}
|
||||
|
||||
// The method get_hash implements a
|
||||
// two-pass union find algorithm
|
||||
// __ __ _______
|
||||
// / \ / \ / _____\
|
||||
// _|__|__|__|_ _/__/__/__|_
|
||||
// | | v | v | | | | | v |
|
||||
// | O O O O | => | O O O O |
|
||||
// |____|__^____| |____________|
|
||||
// | | root
|
||||
// \_/
|
||||
/*
|
||||
The method get_hash implements a
|
||||
two-pass union find algorithm
|
||||
__ __ _______
|
||||
/ \ / \ / _____\
|
||||
_|__|__|__|_ _/__/__/__|_
|
||||
| | v | v | | | | | v |
|
||||
| O O O O | => | O O O O |
|
||||
|____|__^____| |____________|
|
||||
| | root
|
||||
\_/
|
||||
*/
|
||||
int get_hash(int i) {
|
||||
int root(i);
|
||||
while(hash[root] != root)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ class ID_support_handler {
|
|||
public:
|
||||
ID_support_handler() {}
|
||||
|
||||
void reserve(std::size_t n) {}
|
||||
|
||||
int get_hash(int) { return 0; }
|
||||
template<typename Handle> void initialize_hash(Handle /*h*/) {}
|
||||
void initialize_hash(int /*i*/) {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue