unconstrained_set_of.qbk 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. [/license
  2. Boost.Bimap
  3. Copyright (c) 2006-2007 Matias Capeletto
  4. Distributed under the Boost Software License, Version 1.0.
  5. (See accompanying file LICENSE_1_0.txt or copy at
  6. http://www.boost.org/LICENSE_1_0.txt)
  7. ]
  8. [/ QuickBook Document version 1.4 ]
  9. [section unconstrained_set_of Reference]
  10. [section Header "boost/bimap/unconstrained_set_of.hpp" synopsis]
  11. namespace boost {
  12. namespace bimaps {
  13. template< class KeyType >
  14. struct unconstrained_set_of;
  15. struct unconstrained_set_of_relation;
  16. } // namespace bimap
  17. } // namespace boost
  18. [endsect]
  19. [section unconstrained_set_of Views]
  20. An unconstrained_set_of set view is a view with no constraints. The use
  21. of these kind of view boost the bimap performance but the view can not
  22. be accessed. An unconstrained view is an empty class.
  23. namespace boost {
  24. namespace bimaps {
  25. namespace views {
  26. template< ``['-implementation defined parameter list-]`` >
  27. class ``['-implementation defined view name-]``
  28. {
  29. // Empty view
  30. };
  31. } // namespace views
  32. } // namespace bimap
  33. } // namespace boost
  34. In the case of a `bimap< unconstrained_set_of<Left>, ... >`
  35. In the set view:
  36. typedef signature-compatible with relation< Left, ... > key_type;
  37. typedef signature-compatible with relation< Left, ... > value_type;
  38. In the left map view:
  39. typedef Left key_type;
  40. typedef ... mapped_type;
  41. typedef signature-compatible with std::pair< Left, ... > value_type;
  42. In the right map view:
  43. typedef ... key_type;
  44. typedef Left mapped_type;
  45. typedef signature-compatible with std::pair< ... , Left > value_type;
  46. [#unconstrained_set_of_complexity_signature]
  47. [section Complexity signature]
  48. We adopt the scheme outlined in the
  49. [link complexity_signature_explanation complexity signature section].
  50. An unconstrained view can not be accessed by the user, but the
  51. formulas to find the order of an operation for a bimap hold with
  52. the following definitions.
  53. The complexity signature of a `unconstrained_set_of` view is:
  54. * copying: `c(n) = 0`
  55. * insertion: `i(n) = 0`
  56. * hinted insertion: `h(n) = 0`
  57. * deletion: `d(n) = 0`
  58. * replacement: `r(n) = 0`
  59. * modifying: `m(n) = 0`
  60. [endsect]
  61. [section Serialization]
  62. Views cannot be serialized on their own, but only as part of the
  63. `bimap` into which they are embedded. In describing the additional
  64. preconditions and guarantees associated to `list_of` views with respect to
  65. serialization of their embedding containers, we use the concepts defined in the
  66. `bimap` serialization section.
  67. [blurb [*Operation:] saving of a `bimap` b to an output archive
  68. (XML archive) ar.]
  69. * [*Requires:] No additional requirements to those imposed by the container.
  70. [blurb [*Operation:] loading of a `bimap` b' from an input archive
  71. (XML archive) ar.]
  72. * [*Requires:] No additional requirements to those imposed by the container.
  73. [endsect]
  74. [endsect]
  75. [endsect]