0
2
0
1 | 1 |
/* -*- mode: C++; indent-tabs-mode: nil; -*- |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2009 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
9 | 9 |
* Permission to use, modify and distribute this software is granted |
10 | 10 |
* provided that this copyright notice appears in all copies. For |
11 | 11 |
* precise terms see the accompanying LICENSE file. |
... | ... |
@@ -345,25 +345,25 @@ |
345 | 345 |
} |
346 | 346 |
if (dir) { |
347 | 347 |
signedStableRadixIntroSort(buffer, buffer + length, buffer + length, |
348 | 348 |
sizeof(Value) - 1, functor); |
349 | 349 |
std::copy(buffer + length, buffer + 2 * length, first); |
350 | 350 |
} else { |
351 |
signedStableRadixIntroSort(buffer + length, buffer + 2 * length, |
|
351 |
signedStableRadixIntroSort(buffer + length, buffer + 2 * length, |
|
352 | 352 |
buffer, sizeof(Value) - 1, functor); |
353 | 353 |
std::copy(buffer, buffer + length, first); |
354 | 354 |
} |
355 | 355 |
} catch (...) { |
356 | 356 |
allocator.deallocate(buffer, 2 * length); |
357 | 357 |
throw; |
358 | 358 |
} |
359 | 359 |
allocator.deallocate(buffer, 2 * length); |
360 | 360 |
} |
361 | 361 |
|
362 | 362 |
template <typename Value, typename Iterator, typename Functor> |
363 |
void stableRadixUnsignedSort(Iterator first, Iterator last, |
|
363 |
void stableRadixUnsignedSort(Iterator first, Iterator last, |
|
364 | 364 |
Functor functor) { |
365 | 365 |
if (first == last) return; |
366 | 366 |
typedef typename std::iterator_traits<Iterator>::value_type Key; |
367 | 367 |
typedef std::allocator<Key> Allocator; |
368 | 368 |
Allocator allocator; |
369 | 369 |
1 | 1 |
/* -*- mode: C++; indent-tabs-mode: nil; -*- |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2009 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
9 | 9 |
* Permission to use, modify and distribute this software is granted |
10 | 10 |
* provided that this copyright notice appears in all copies. For |
11 | 11 |
* precise terms see the accompanying LICENSE file. |
0 comments (0 inline)