244 Commits

Author SHA1 Message Date
joaquintides
5c17744f34 fixed documentation error 2024-03-15 09:49:30 +01:00
joaquintides
2b2c52a27f fixed #70 2023-09-09 17:06:06 +02:00
joaquintides
343cb4c6f3 fixed container size serialization in LLP64 2023-05-22 13:26:17 +02:00
joaquintides
f8143b9ff9 fixed #68 2023-05-21 11:39:44 +02:00
joaquintides
c42c2509bc removed header-level dependency from Boost.Serialization 2023-02-26 19:16:45 +01:00
joaquintides
eeac86a37e updated release notes 2022-12-28 12:44:10 +01:00
joaquintides
2404754d42 fixed explanatory code as prompted by discussion in #63 2022-08-15 16:31:01 +02:00
joaquintides
fba66b0538 updated dates and release notes 2022-04-08 17:13:04 +02:00
joaquintides
647a60da24 updated revision dates 2022-04-03 16:29:38 +02:00
Jonathan Wakely
9847e2daf8
Change encoding to UTF-8 for doc/style.css (#55) 2022-02-05 13:03:19 +01:00
joaquintides
7c591a13aa
improved performance of count in ranked indices (#56)
* count for ranked_index uses rank

Normally, count is calculated as the distance between iterators,
which takes linear time when count(x,comp) is comparable with n,
but for ranked indices we can subtract the values or rank,
reducing the complexity from log(n)+count(x,comp) to log(n).

* Added test for new count(x) and count(x,comp) in ranked_index

Both, the existing implementation of count from ordered_index and
the new implementation for ranked_index are compared with the
common sense. Positive results of this test show in particular that
the numbers produced by the new implementation are consistent with
those from the existing implementation and hence correct.

* Benchmark of count(): ordered_index vs ranked_index

A benchmark is added as count_benchmark.cpp in the 'example'
directory.

When the values of an index are unique, both implementations are
comparable (ranked_index is 10-15% faster).

However, for highly non-unique indices (like the age of people),
the new implementation in ranked_index outperforms ordered_index.
For 1 000 people of age in 0..99 ranked_index is ~2x faster,
for 10 000 people it is 12-13x faster, and
for 100 000 people it is 95-100x times faster.

For even more non-unique indices (like sex or the age of pupils)
or coarse comparison predicates (grouping people in age groups
like 0..9, 10..19 etc.) the gap in performance grows further.
For a comparison predicate comparing 'age/10' for age in 0..99,
similar gaps in performance occur already for 10x smaller
containers:
for 100 people count in ranked_index is 2x faster,
for 1 000 people it is ~9x faster,
for 10 000 people it is 95-100x faster,
for 100 000 people it is almost 1000x faster.

* Documentation updated with new complexity of count in ranked_index

* simplified Damian's contribution

* reorganized code

* covered ranked_index::count

* updated docs

Co-authored-by: DamianSawicki <86234282+DamianSawicki@users.noreply.github.com>
2022-02-05 12:59:43 +01:00
joaquintides
7c3cb66008 corrected statements on SCARYness 2021-08-30 20:55:10 +02:00
joaquintides
a52810fc3d
implemented merge operations (#49)
* initial draft

* modified appveyor.yml for this branch

* dropped BOOST_RV_REF
as it doesn't handle lvalue refs

* befriended index_base from all indices
so as to be grant access to final_extract_for_merge_ from an external container

* added rvalue ref merge
(test expected to fail in C++03)

* added explicit boost::move on rvalue ref
for the benefit of C++03 compilers

* fixed previous workaround

* refactored merge algorithm into multi_index_container

* added hashed_index::merge

* reimplemented sequenced_index::splice(position,x)

* added missing this->'s

* refactored SFINAEing code

* made sequenced_index::splice(position,x) exception robust

* reimplemented random_access_index::splice(position,x)

* micro-optimized legacy code in random_access_index::splice(position,x)

* added missing #include

* reimplemented sequenced_index::splice(position,x,i)

* reimplemented random_access_index::splice(position,x,i)

* reimplemented sequenced_index::splice(position,x,first,last)

* reimplemented random_access_index::splice(position,x,first,last)

* re-engineered sequenced_index::splice(position,x,i)
so that it works when source and destination belong to the same container

* stylistic

* re-engineered random_access_index::splice(position,x,i)
so that it works when source and destination belong to the same container

* re-engineered sequenced_index::splice(position,x,first,last)
so that it works when source and destination belong to the same container

* stylistic

* fixed bug in rvalue ref overload of sequenced_index::splice(position,x,first,last)

* fixed internal sequenced_index::splice(position,x,first,last) across different indices

* re-engineered random_access_index::splice(position,x,first,last)
the same way as done with sequenced_index

* replaced multi_index_container::merge_ with transfer_range_
so as to refactor some code in non-key-based indices

* fixed safe mode check for different-type containers

* hardened merge/splice tests

* s/BOOST_RV_REF/BOOST_FWD_REF

* called the right merge_different overload

* fixed problem with Boost.Move C++03 perfect fwd emulation

* updated (C) year

* allowed intra-container full splice

* required position==end() in intra-container full splice

* made pointwise splice return a pair<iterator,bool>

* added partial merge functionality to key-based indices
plus fixed a compile-time error with legacy splice code when applied to different-type indices

* suppressed unused variable

* fixed wrong signature in splice memfun

* made safe-mode iterators SCARY

* refactored any_container_view

* implemented safe iterator transfer in merge/splice

* reorganized internal deps

* stylistic

* automatically checked iterator invalidation upon merge/splice

* removed commented-out code

* checked allocator equality

* reimplemented random_access_index internal, cross-index splice in linear time

* updated docs

* reverted appveyor.yml
2021-08-19 10:41:03 +02:00
joaquintides
5623d2b9e2 added contains (#35) 2021-07-29 12:04:15 +02:00
joaquintides
3dad7f38a4 fixed #45 2021-07-08 19:41:40 +02:00
joaquintides
9d1813aaad typo 2020-06-06 10:32:24 +02:00
joaquintides
e69466039d implemented node extraction/insertion (#27) 2020-05-09 20:25:41 +02:00
joaquintides
2374136ea8 clarified documentation on read/write key extractors (#32) 2020-04-19 21:10:57 +02:00
joaquintides
ffbdc49bf2 typos (#32) 2020-04-18 11:59:45 +02:00
joaquintides
a8d34a56f7 made multi_index_container AllocatorAware (#30) 2020-01-26 11:52:23 +01:00
joaquintides
89b4ff7bbf abode by [depr.impldec] 2020-01-21 15:04:21 +01:00
joaquintides
c9a21d79d6 used proper HTLM entities (#31) 2020-01-09 14:56:30 +01:00
joaquintides
d4e81bbe7e fixed doc snippets (https://stackoverflow.com/a/58921647/213114) 2019-11-18 20:47:16 +01:00
joaquintides
3caea31bfc enabled ADL for internal swapping of user-provided objects (#29) 2019-11-09 12:59:55 +01:00
joaquintides
7508edc5c2 typo 2019-06-11 09:12:42 +02:00
joaquintides
e49ae2b4c2 handled volatile/ref-qualified/noexcept memfun key extraction (#24) 2019-06-09 17:32:46 +02:00
joaquintides
09ea3b91be fixed revised date 2019-02-20 11:21:53 +01:00
joaquintides
9504362e08 updated mentions to unordered associative containers (heads-up from #20) 2019-02-20 11:19:09 +01:00
joaquintides
c57a6771fd refactored 91f21167118564daedafb0224132f7b2b6651e05 2018-12-30 14:59:14 +01:00
joaquintides
18cea285e2 inherited size_type and difference_type from the allocator 2018-12-29 13:06:57 +01:00
joaquintides
fe746a187c documented BOOST_MULTI_INDEX_KEY_SUPPORTED 2018-08-22 11:23:32 +02:00
joaquintides
504574a265 s/·/&middot; 2018-08-18 13:25:00 +02:00
joaquintides
f31407d621 typo 2018-08-18 12:06:13 +02:00
joaquintides
7cc508376c introduced C++17 terse key specification syntax 2018-08-17 13:07:53 +02:00
joaquintides
69488c737b editorial 2018-08-06 09:33:50 +02:00
joaquintides
9623bf0a7d addressed https://svn.boost.org/trac10/ticket/13518 2018-04-13 18:06:55 +02:00
joaquintides
4d21e89621 addressed https://svn.boost.org/trac10/ticket/13478 2018-03-13 22:05:01 +01:00
joaquintides
350d337348 avoided void& in non_std_allocator<void> 2018-01-03 21:34:46 +01:00
joaquintides
36b17f6de6 typo 2018-01-01 13:09:27 +01:00
joaquintides
2f21af1751 documented previous commit 2018-01-01 11:36:34 +01:00
joaquintides
5744230acf protected against overloaded operator& 2017-11-23 23:26:53 +01:00
joaquintides
3613e2287b updated release notes 2017-09-21 11:12:26 +02:00
joaquintides
bc5a3bdb67 updated last revision date 2017-08-29 08:41:43 +02:00
Mitsuru Kariya
53607ec851 Fix typo 2017-08-29 10:03:15 +09:00
joaquintides
b9a4467f34 addressed https://svn.boost.org/trac/boost/ticket/12542 2017-08-24 23:41:35 +02:00
joaquintides
43d835120e fixed links 2017-07-07 11:39:28 +02:00
joaquintides
3e1095d609 fixed [12955] 2017-04-10 12:36:25 +02:00
joaquintides
4a5c4fc1a1 removed dependency from BOOST_IS_CONVERTIBLE intrinsic 2016-12-14 11:27:41 +01:00
joaquintides
a63646f567 suppressed strict aliasing warnings related to boost::aligned_storage 2016-03-09 23:56:07 +01:00
joaquintides
c055516320 clarified permissible usage of modify functions as per https://svn.boost.org/trac/boost/ticket/11801 2015-11-26 20:29:19 +01:00