Stephen Kelly cebeed2486 cmAlgorithms: Add cmRemoveDuplicates algorithm.
Start by creating a vector to hold a unique values of the input range.  We
expect that in most cases, there will be relatively few duplicates, so
reserving enough memory for a complete copy is worthwhile.  Unlike a solution
involving a std::set, this algorithm allocates all the memory it needs
in one go and in one place, so it is more cache friendly.

Populate the unique copy with a lower_bound insert algorithm and record the
indices of duplicates.  This is the same complexity as the std::set insert
algorithm, but without the need to allocate memory on the heap and other
disadvantages of std::set.

Remove the duplicates with the cmRemoveIndices algorithm.
2015-02-15 20:46:25 +01:00
..
2015-02-05 20:44:25 +01:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2015-02-13 00:01:16 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:35 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2012-09-28 17:00:52 -04:00
2014-10-15 23:16:44 +02:00
2014-10-15 23:16:44 +02:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-11 15:03:50 +01:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2012-02-02 23:40:21 +00:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:35 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-04-28 21:43:40 -04:00
2014-03-08 13:05:39 -05:00
2014-06-05 12:44:18 -04:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2015-02-05 20:44:25 +01:00
2015-02-05 20:44:25 +01:00